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