#include <bits/stdc++.h>
int gcd(int a, int b) {
  while (b != 0) {
    int t = b;
    b = a % b;
    a = t;
  }
  return a;
}
int main(void) {
  long long int n;
  scanf("%lld", &n);
  printf("%lld\n", n / 2520);
  return 0;
}
