#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    int ans = 0;
    int cand[] = {105,135,165,189,195};
    for(int i = 0;i < 5;i++)ans += (n >= cand[i]);
    cout << ans << endl;
}