import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int total = 0;
	for(int n = 105; n<=N; n=n+2) {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	}
	System.out.println(total);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int total = 0;
	for(int n = 105; n<=N; n=n+2) {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	}
	System.out.println(total);
    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int total = 0;
	for(int n = 105; n<=N; n=n+2) {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	}
	System.out.println(total);
    } main {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int total = 0;
	for(int n = 105; n<=N; n=n+2) {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	}
	System.out.println(total);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int total = 0; total 0 for(int n = 105; n<=N; n=n+2) {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	} int n = 105; int n = 105; n 105 n<=N n N n=n+2 n=n+2 n n+2 n 2 {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	} {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	} int nClone = n; nClone n int cnt = 1; cnt 1 for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    } int i = 2; int i = 2; i 2 i<=n i n i++ i++ i {
		if(nClone%i==0) {
			cnt++;
		}
	    } {
		if(nClone%i==0) {
			cnt++;
		}
	    } if(nClone%i==0) {
			cnt++;
		} nClone%i==0 nClone%i nClone i 0 {
			cnt++;
		} cnt++ cnt if(cnt == 8) {
		total++;
	    } cnt == 8 cnt 8 {
		total++;
	    } total++ total System.out.println(total) System.out.println System.out System System.out total String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int total = 0;
	for(int n = 105; n<=N; n=n+2) {
	    int nClone = n;
	    int cnt = 1;
	    for(int i = 2; i<=n; i++) {
		if(nClone%i==0) {
			cnt++;
		}
	    }
	    if(cnt == 8) {
		total++;
	    }
	}
	System.out.println(total);
    }
}