#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a;
b=a*1001;
c=b/7/11/13;
cout<<c;
}
/**************************************************************
Problem: 1961
User: toughuatao1
Language: C++
Result: Accepted
Time:14 ms
Memory:2072 kb
****************************************************************/