#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 a[] = {6,5,6,11}; int main(void){ long long n; cin >> n; long long k = 2041; long long cnt = -1; int j = 1; for(long long i = 2014;i <= n;i+=a[(j++)%4]){ if(j>10000)j = j%4; cnt++; } cout << max(0LL,cnt) << endl; return 0; }