// https://omegaup.com/arena/problem/Practicando-funciones-2/ 
#include <stdio.h> 
#include <math.h> 
 
float h(float x) { 
   return sqrt(x + 10); 
} 
 
float g(float x, float y) { 
   return h(x + y) - 5 * h(x * y + 1); 
} 
 
float f(float x) { 
   return g(x, x + 1) + h(2 * x) + 7; 
} 
 
int main( ) { 
   float z; 
   scanf("%f", &z); 
   printf("%.4f", f(z)); 
   return 0; 
}