#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) for(int i=0;i<(n);++i) #define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++) bool uru(ll y){ bool ret; if(y%4==0){ if(y%100==0){ if(y%400==0) ret=true; else ret=false; } else ret=true; } else ret=false; return ret; } int main(int argc, char const *argv[]) { ll y; cin >>y; int n=3; ll ans=0; ll before=2014; for(ll i=2015; i<=y; ++i){ if(uru) n+=2; else n+=1; n%=7; if(n==3){ ++ans; //cout << " " << i << endl; if(i-before!=7){ cout<<"not 7:"<