#include <iostream>
using namespace std;
int fact(int x){
return x == 0 ? 1 : x * fact(x-1);
}
int main(){
double x;
cin >> x;
double p = x;
double sin = 0;
for(int i = 1; i <= 7; i+=2){
if(i%4 == 1)
sin += p / fact(i);
else sin -= p/fact(i);
p = p * x * x;
}
cout << sin;
}