#include #include #include #include #include using namespace std; bool is_uruu(long long n){ if(n%4==0 && n%100!=0 && n%400!=0) return true; return false; } int amari(int b){ if(b<6)return 0; else if(b<11)return 1; else if(b<17)return 2; else if(b<28)return 3; return 3; } int main(void){ long long n; cin >> n; // 2014/7/23/wed long long k = 2041; long long uruu = (n/4 - n/100 + n/400) - (k/4 - k/100 + k/400); if(n < 2019)cout << 0 << endl; else if(n < 2024)cout << 1 << endl; else if(n < 2030)cout << 2 << endl; else if(n < 2041)cout << 3 << endl; else if(n == 2041)cout << 4 << endl; else cout << ((n-k)/28)*4 + amari((n-k)%28) + 4<< endl; return 0; }