#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  unsigned long long n, res = 0;
  cin >> n;
  res = n / 2520;
  cout << res;
}
