// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<vector>

#include<stack>

#include <cmath>

#include <limits>

#include<set>

#include <iomanip>

#include <queue>

#include <string>

#pragma GCC optimize("Ofast")

using namespace std;

const long long INF=20000000000;

//setprecision(2) <<



const int MOD = 1000000007;



long long max(long long a,long long b){

	if(a<b)return b;

	else return a;	

}

long long min(long long a,long long b){

	if(a>b)return b;

	else return a;	

}

long long gcd(long long a,long long b){

	if(a<b)swap(a,b);

	if(a%b==0)return b;

	else return gcd(a%b,b);

}



long long lcm(long long a,long long b){

	return a*b/gcd(a,b);

}





long long getDigit(long long n){

	if(n==1)return 1;

	else return log10(n)+1;

}



class Point{

public:

	long long x;

	long long y;

};

long long N,M;

vector<long long>X(100006,0);

bool isOK(long long time){

	long right=0;

	for(int i=0;i<M;i++){

		if(right>=X[i]-1){

			//go right

			right=X[i]+time;

		}else{

			if(right < X[i]-time-2)return false;

			right=max(X[i],X[i]+(time-(2*(X[i]-right)-1)));

		}

		//cout<<right<<endl;

	}

	if(right<N-1)return false;

	return true;

	

}

int main(){

	ios::sync_with_stdio(false);

	cin.tie(nullptr);

	int N;

	cin>>N;

	int ans=0;

	int num=0;

	for(int i=1;i<=N;i++){

		num=0;

		//cout<<num<<endl;

		if(i%2==0)continue;

		for(int j=1;j<=i;j++){

			if(i%j==0)num++;

		}

		if(num==8)ans++;

	}

	cout<<ans<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 1.8161519708804577x):
#include <cassert>

#include <cctype>

#include <cerrno>

#include <cfloat>

#include <ciso646>

#include <climits>

#include <clocale>

#include <cmath>

#include <csetjmp>

#include <csignal>

#include <cstdarg>

#include <cstddef>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <ctime>

#include <cwchar>

#include <cwctype>

#include <ccomplex>

#include <cfenv>

#include <cinttypes>

#include <cstdbool>

#include <cstdint>

#include <ctgmath>

#include <algorithm>

#include <bitset>

#include <complex>

#include <deque>

#include <exception>

#include <fstream>

#include <functional>

#include <iomanip>

#include <ios>

#include <iosfwd>

#include <iostream>

#include <istream>

#include <iterator>

#include <limits>

#include <list>

#include <locale>

#include <map>

#include <memory>

#include <new>

#include <numeric>

#include <ostream>

#include <queue>

#include <set>

#include <sstream>

#include <stack>

#include <stdexcept>

#include <streambuf>

#include <string>

#include <typeinfo>

#include <utility>

#include <valarray>

#include <vector>

#include <array>

#include <atomic>

#include <chrono>

#include <codecvt>

#include <condition_variable>

#include <forward_list>

#include <future>

#include <initializer_list>

#include <mutex>

#include <random>

#include <ratio>

#include <regex>

#include <scoped_allocator>

#include <system_error>

#include <thread>

#include <tuple>

#include <typeindex>

#include <type_traits>

#include <unordered_map>

#include <unordered_set>

#define rep(i, n) for(int i = 0; i < (int)(n); i++)

#define rep2(i, n) for(int i = 1; i <= (int)(n); i++)

#define all(x) (x).begin(),(x).end()

using namespace std;

typedef int64_t ll;

typedef long double ld;

const ll INF=(1LL<<62);

const double inf=pow(10,10);

const ld pi=acosl(1);

const ll mod = 1000000007;

const int dx[4]={0,1,0,-1};

const int dy[4]={1,0,-1,0};

const int ddx[8]={1,0,-1,-1,-1,0,1,1};

const int ddy[8]={1,1,1,0,-1,-1,-1,0};



template< int mod >

struct ModInt {

  int x;



  ModInt() : x(0) {}



  ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}



  ModInt &operator+=(const ModInt &p) {

    if((x += p.x) >= mod) x -= mod;

    return *this;

  }



  ModInt &operator-=(const ModInt &p) {

    if((x += mod - p.x) >= mod) x -= mod;

    return *this;

  }



  ModInt &operator*=(const ModInt &p) {

    x = (int) (1LL * x * p.x % mod);

    return *this;

  }



  ModInt &operator/=(const ModInt &p) {

    *this *= p.inverse();

    return *this;

  }



  ModInt operator-() const { return ModInt(-x); }



  ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }



  ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }



  ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }



  ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }



  bool operator==(const ModInt &p) const { return x == p.x; }



  bool operator!=(const ModInt &p) const { return x != p.x; }



  ModInt inverse() const {

    int a = x, b = mod, u = 1, v = 0, t;

    while(b > 0) {

      t = a / b;

      swap(a -= t * b, b);

      swap(u -= t * v, v);

    }

    return ModInt(u);

  }



  ModInt pow(int64_t n) const {

    ModInt ret(1), mul(x);

    while(n > 0) {

      if(n & 1) ret *= mul;

      mul *= mul;

      n >>= 1;

    }

    return ret;

  }



  friend ostream &operator<<(ostream &os, const ModInt &p) {

    return os << p.x;

  }



  friend istream &operator>>(istream &is, ModInt &a) {

    int64_t t;

    is >> t;

    a = ModInt< mod >(t);

    return (is);

  }



  static int get_mod() { return mod; }

};



using modint = ModInt< mod >;



map< int64_t, int > prime_factor(int64_t n) {

  map< int64_t, int > ret;

  for(int64_t i = 2; i * i <= n; i++) {

    while(n % i == 0) {

      ret[i]++;

      n /= i;

    }

  }

  if(n != 1) ret[n] = 1;

  return ret;

}



vector< int64_t > divisor(int64_t n) {

  vector< int64_t > ret;

  for(int64_t i = 1; i * i <= n; i++) {

    if(n % i == 0) {

      ret.push_back(i);

      if(i * i != n) ret.push_back(n / i);

    }

  }

  sort(begin(ret), end(ret));

  return (ret);

}



int main(){

	ll n;cin>>n;

	ll ans=0;

	rep(i,n+1){

		if(i%2==0)continue;

		if(divisor(i).size()==8)ans++;

	}

	cout<<ans<<endl;

}