#include using namespace std; int calc(int a){ int x=0; if(a%4==0){ x=1; if(a%100==0){ x=0; if(a%400==0){ x=1; } } } return x; } int main(){ int N; cin>>N; int x=0,y=0; for(int i=2015; i<=N; ++i){ x+=1; if(calc(i)) x+=1; if(x==7) x=0, y+=1; if(x==8) x=1; } cout<