#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>N; ll dif=max(N-2800*2-2014,0LL)/2800; ll ret=dif*399; N -= dif*2800; y=1; for(x=2015;x<=N;x++) { if(x%400==0 || (x%100!=0 && x%4==0)) y++; if(y%7==0) ret++; y++; } cout<