#include <bits/stdc++.h>
using namespace std;
int main() {
  double n = 0;
  cin >> n;
  double result = n / 2520;
  cout.precision(0);
  cout.setf(ios::fixed);
  cout << floor(result);
  return 0;
}
