using System;
public class Program
{
public static void Main()
double x = double.Parse(Console.ReadLine());
double y;
if (x < 2) y = Math.Pow(x, 4) -2*x;
else y = 4 * Math.Sqrt(x) + Math.Pow(x,2);
Console.WriteLine("y="+ y);
}