// YukiCoderたんイェイ〜 #include #include std::vector v{3, 8, 14, 25, 31, 36, 42, 53, 59, 64, 70, 81, 87, 92, 98, 104, 110, 121, 127, 132, 138, 149, 155, 160, 166, 177, 183, 188, 194, 200, 206, 217, 223, 228, 234, 245, 251, 256, 262, 273, 279, 284, 290, 302, 313, 319, 324, 330, 341, 347, 352, 358, 369, 375, 380, 386, 397}; bool isSame[400]; int main(){ long long N; scanf("%lld", &N); for(int i : v){isSame[i] = true;} long long res = 0ll; if(N < 2400){ for(int y=2015;y<=N;y++){ res += isSame[y%400]; } }else{ for(int y=2015;y<2400;y++){ res += isSame[y%400]; } res += (N-2400) / 400 * v.size(); for(N=(N-2400)%400;N>=0;N--){ res += isSame[N%400]; } } printf("%lld\n", res); }