#include <iostream>
#include <cmath>
using namespace std;
int main() {
double a;
cin >> a;
cout << (a <= 0 ? 0 : a <= 1 ? a * a - 1 : a * a - sin(M_PI * a * a)) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWRvdWJsZSBhOwoJY2luID4+IGE7Cgljb3V0IDw8IChhIDw9IDAgPyAwIDogYSA8PSAxID8gYSAqIGEgLSAxIDogYSAqIGEgLSBzaW4oTV9QSSAqIGEgKiBhKSkgPDwgZW5kbDsKCXJldHVybiAwOwp9