import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int cnt = 0; cnt 0 for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    } int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    } {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    } int tmp_cnt = 0; tmp_cnt 0 for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      } int j=1; int j=1; j 1 j<=i j i j++ j++ j {
        if(i%j==0) {
          tmp_cnt += 1;
        }
      } {
        if(i%j==0) {
          tmp_cnt += 1;
        }
      } if(i%j==0) {
          tmp_cnt += 1;
        } i%j==0 i%j i j 0 {
          tmp_cnt += 1;
        } tmp_cnt += 1 tmp_cnt 1 if(tmp_cnt == 8) {
        cnt+=1;
      } tmp_cnt == 8 tmp_cnt 8 {
        cnt+=1;
      } cnt+=1 cnt 1 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;
    for(int i=1; i<=n; i+=2) {
        int tmp_cnt = 0;
      for(int j=1; j<=i; j++){
        if(i%j==0) {
          tmp_cnt += 1;
        }
      }
      if(tmp_cnt == 8) {
        cnt+=1;
      }
    }
    System.out.println(cnt);
  }
}