#include #pragma GCC optimize("O3", "unroll-loops", "fast-math") #pragma GCC target("avx") using namespace std; struct fast_ios { fast_ios(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_; #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i istream &operator>>(istream &is, vector &vec) { for (auto &v : vec) is >> v; return is; } #define dbg(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ") " << __FILE__ << endl; int main() { double x; cin >> x; double ret = 0.0; if (x == 0) ret = 1; else { double s = sin(x) / x; ret += s * s; } FOR(j, 1, 4e7) { double y = x + j; double s = sin(y) / y; ret += s * s; } cout << ret << '\n'; }