#include <bits/stdc++.h>
const int INF = 1 << 30;
const long long LINF = 1ll << 62;
const unsigned long long ULINF = 1ull << 63;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  unsigned long long n;
  cin >> n;
  cout << n / 2520;
}
