import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int n) {
    int ans = 0;
    for (int i = 1; i <= n; i += 2) {
        int x = 0;
        for (int j = 1; j <= i; j++) {
            if (i % j == 0) x++;
        }
        if (x == 8) ans++;
    }
    return ans;
}

void main() {
    int n = readint;
    writeln(calc(n));
}
