#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  int ans = 0;
  cin>>a;
  for(int i=105;i<=a;i=i+2)
  {
    b=0;
    for(int j=1;j<=i;j=j+2) 
    if(i%j==0) b++;
    if(b==8) ans++;
  }
    cout<<ans<<endl;
}
