#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define tr(container, it) \
        for (auto it = container.begin(); it != container.end(); it++)
#define scontains(c, x) ((c).find(x) != (c).end())   //O(log n)
#define contains(c, x) (find((c).begin(),(c).end(),x) != (c).end()) //O(n)
#define ill(_x)  ll _x;scanf("%lld",&_x);
#define idb(_x)  double _x;scanf("%lf",&_x);
#define all(x) (x).begin(),(x).end()
#define pll pair<ll,ll>
#define mll map<ll,ll>
#define vll vector<ll>
#define sll set<ll>
#define vs vector<string>
#define in0(x, a, b)((x)>=a && (x)<=b    )
#define in1(x, a, b)((x)>a && (x)<b)
#define  rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
const double pi = 3.14159265358979323846;
const int INF = 0x3f3f3f3f;
const int X10 = 1024, X11 = 2048, X12 = 4096, X13 = 8196, X14 = 16392, X15 = 32786, X16 = 65536, X17 = 131072, X18 = 262144, X19 = 524288, X20 = 1048576;

class UnionFind {
private:
    vector<int> p, rank;
    int N;
    int findSet2(int i, bool* A){A[i] = 1;return (p[i] == i) ? i : (p[i] = findSet2(p[i], A));}
public:
    UnionFind(int N) {
        rank.assign(N, 0);
        p.assign(N, 0);
        for (int i = 0; i < N; i++) p[i] = i;
        this->N = N;
    }

    int findSet(int i) { return (p[i] == i) ? i : (p[i] = findSet(p[i])); }

    bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }

    void unionSet(int i, int j) {
        if (!isSameSet(i, j)) {
// if from different set
            int x = findSet(i), y = findSet(j);
            if (rank[x] > rank[y]) p[y] = x;
// rank keeps the tree short
            else {
                p[x] = y;
                if (rank[x] == rank[y]) rank[y]++;
            }
        }
    }


    int numDisjointSets(){
        set<int> s;
        bool* visited = new bool[this->N];
        memset(visited, 0, sizeof(bool)*this->N);
        for (int i = 0; i < N; ++i) {
            if(!visited[i])s.insert(findSet2(i, visited));
        }
        return s.size();
    }

    int maxElements(){
        int mx = 0;
        map<int, int> m;
        for (int i = 0; i < N; ++i) {
            m[findSet(i)] ++;
        }
        set<pair<int, int>> s;
        for(auto p : m){
            s.insert({p.second, p.first});
        }
        return s.rbegin()->first ;
    }


};


template<typename T>
bool isPrime(T n)
{
    if (n <= 1)  return false;
    if (n <= 3)  return true;
    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
            return false;

    return true;
}


template <typename A, typename B>
map<B, A> map_transform(map<A, B> m){
    map<B, A> m1;
    for(auto p : m){
        m1[p->second] = p->first;
    }
    return m1;
};

struct jump{
    int height;
    string s;

};
ll sumOfDigitsFrom1ToN(ll n)
{
    // base case: if n<10 return sum of
    // first n natural numbers
    if (n<10)
        return n*(n+1)/2;

    // d = number of digits minus one in n. For 328, d is 2
    ll d = log10(n);

    // computing sum of digits from 1 to 10^d-1,
    // d=1 a[0]=0;
    // d=2 a[1]=sum of digit from 1 to 9 = 45
    // d=3 a[2]=sum of digit from 1 to 99 = a[1]*10 + 45*10^1 = 900
    // d=4 a[3]=sum of digit from 1 to 999 = a[2]*10 + 45*10^2 = 13500
    ll *a = new ll[d+1];
    a[0] = 0, a[1] = 45;
    for (int i=2; i<=d; i++)
        a[i] = a[i-1]*10 + 45*ceil(pow(10,i-1));

    // computing 10^d
    ll p = ceil(pow(10, d));

    // Most significant digit (msd) of n,
    // For 328, msd is 3 which can be obtained using 328/100
    ll msd = n/p;

    // EXPLANATION FOR FIRST and SECOND TERMS IN BELOW LINE OF CODE
    // First two terms compute sum of digits from 1 to 299
    // (sum of digits in range 1-99 stored in a[d]) +
    // (sum of digits in range 100-199, can be calculated as 1*100 + a[d]
    // (sum of digits in range 200-299, can be calculated as 2*100 + a[d]
    //  The above sum can be written as 3*a[d] + (1+2)*100

    // EXPLANATION FOR THIRD AND FOURTH TERMS IN BELOW LINE OF CODE
    // The last two terms compute sum of digits in number from 300 to 328
    // The third term adds 3*29 to sum as digit 3 occurs in all numbers
    //                from 300 to 328
    // The fourth term recursively calls for 28
    return msd*a[d] + (msd*(msd-1)/2)*p +
           msd*(1+n%p) + sumOfDigitsFrom1ToN(n%p);
}

#include <map>
typedef long long ll;
//O(n^1/2)
//ex. 100=2^2*5^2 return {2:2,5:2}

std::map<ll, ll> factorize(ll n) {
    std::map<ll, ll> m;
    while (n % 2 == 0) {
        ++m[2];
        n /= 2;
    }
    for (ll i = 3; i * i <= n; i += 2) {
        while (n % i == 0) {
            ++m[i];
            n /= i;
        }
    }
    if (n != 1) m[n]++;
    return m;
}

//int main() {
//	ll cnt = 1;
//	for (auto i : factorize(1000)) {
//		cnt *= (i.second + 1);
//	}
//	std::cout << cnt;
//
//
//}
int cnt(map<ll, ll> m){
    int t = 1;
    for(auto p : m)t *=(p.second+1);
    return t;

}
void _() {
    int t;
    cin >> t;
    int a =0;
    for (int i = 5; i < t+1; i+=2) {
        if(cnt(factorize(i))== 8 )a++;
    }
    cout << a;
}


int main() {
#ifdef Debug
    freopen("/home/joduskame/Desktop/cpp/IO/Input.txt", "r", stdin);
    freopen("/home/joduskame/Desktop/cpp/IO/Output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    _();
    return 0;

}








Measured memory_bytes: 256