#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long mod = 1e9 + 7;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  unsigned long long n;
  cin >> n;
  unsigned long long c = 2 * 3 * 4 * 5 * 7 * 3;
  if (c > n) {
    cout << "0\n";
    return 0;
  }
  cout << n / c << "\n";
  return 0;
}
