#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
const ll INF = 1e18;
#define print(x) cout << (x) << endl;
#define rep(i,m,n) for(ll i = (m); i < (n); i++)

// isprime[n] := is n prime?
// mebius[n] := mebius value of n
// min_factor[n] := the min prime-factor of n
struct Eratos {
    vector<ll> primes;
    vector<bool> isprime;
    vector<ll> mebius;
    vector<ll> min_factor;

    Eratos(ll MAX) : primes(),
                    isprime(MAX+1, true),
                    mebius(MAX+1, 1),
                    min_factor(MAX+1, -1) {
        isprime[0] = isprime[1] = false;
        min_factor[0] = 0, min_factor[1] = 1;
        for (ll i = 2; i <= MAX; ++i) {
            if (!isprime[i]) continue;
            primes.push_back(i);
            mebius[i] = -1;
            min_factor[i] = i;
            for (ll j = i*2; j <= MAX; j += i) {
                isprime[j] = false;
                if ((j / i) % i == 0) mebius[j] = 0;
                else mebius[j] = -mebius[j];
                if (min_factor[j] == -1) min_factor[j] = i;
            }
        }
    }

    // prime factorization
    // primeに素因数、expに乗数が格納されている
    vector<pair<ll,ll>> prime_factors(ll n) {
        vector<pair<ll,ll>> res;
        while (n != 1) {
            ll prime = min_factor[n];
            ll exp = 0;
            while (min_factor[n] == prime) {
                ++exp;
                n /= prime;
            }
            res.push_back(make_pair(prime, exp));
        }
        return res;
    }

    // enumerate divisors
    vector<ll> divisors(ll n) {
        vector<ll> res({1});
        auto pf = prime_factors(n);
        for (auto p : pf) {
            ll n = (ll)res.size();
            for (ll i = 0; i < n; ++i) {
                ll v = 1;
                for (ll j = 0; j < p.second; ++j) {
                    v *= p.first;
                    res.push_back(res[i] * v);
                }
            }
        }
        return res;
    }
};

//ここでエラトステネスのふるいにかけるMAX値を指定する。
const ll MAX = 201;

int main() {
    Eratos er(MAX);
    vector<vector<ll>> divs(MAX);
    ll N, count = 0;
    cin >> N;
    //全ての約数をMAXまでの全ての数字について吐き出す。
    for (ll n = 1; n < N+1; ++n) {
        vector<ll> diii;
        divs[n] = er.divisors(n);
        for (ll i = 0; i < divs[n].size(); i++) {
            diii.push_back(divs[n][i]);
        }
        if (diii.size() == 8 && n%2 == 1) count++;
    }
    cout << count << endl;

    //MAXまでの全ての数字が素数かどうか0/1で出力
    // for (ll n = 1; n < MAX; ++n) {
    //     bool isP = er.isprime.at(n);
    //     cout << isP << endl;
    // }

    //素因数分解。(素因数,乗数)のペアをMAXまでの全ての数字について吐き出し続ける。
    // for (ll n = 1; n < MAX; ++n) {
    //     vector<pair<ll,ll>> PFs = er.prime_factors(n);
    //     for (ll i = 0; i < PFs.size(); i++) {
    //         cout << PFs.at(i).first << " " << PFs.at(i).second << "/";
    //     }
    //     cout << endl;
    // }
}

// int main() {
//     cin.tie(0);
//     ios::sync_with_stdio(false);
//     ll N, count = 0;
//     cin >> N;
//     for (ll i = 1; i <= N; i++)
//     {
//         if (i%2 == 0) continue;
//         if (enum_div(i).size()==8) {
//             count++;
//         }
//     }
//     cout << count << endl;
// }

Measured memory_bytes: 256