import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();

    int ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  }
  
  private static int countYakusu(int n) {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  }
} 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 ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  }
  
  private static int countYakusu(int n) {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();

    int ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();

    int ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    } int i = 1; int i = 1; i 1 i <= N i N i+=2 i+=2 i 2 {
      if (countYakusu(i) == 8) {
        ans++;
      }
    } {
      if (countYakusu(i) == 8) {
        ans++;
      }
    } if (countYakusu(i) == 8) {
        ans++;
      } countYakusu(i) == 8 countYakusu(i) countYakusu i 8 {
        ans++;
      } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static int countYakusu(int n) {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  } countYakusu {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  } int ret = 0; ret 0 for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    } int i = 1; int i = 1; i 1 i*i <= n i*i i i n i++ i++ i {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    } {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    } if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      } n % i == 0 n % i n i 0 {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      } if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        } n / i == i n / i n i i {
          ret += 1;
        } ret += 1 ret 1 {
          ret += 2;
        } ret += 2 ret 2 return ret; ret int n n public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();

    int ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  }
  
  private static int countYakusu(int n) {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();

    int ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  }
  
  private static int countYakusu(int n) {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();

    int ans = 0;
    for (int i = 1; i <= N; i+=2) {
      if (countYakusu(i) == 8) {
        ans++;
      }
    }
    System.out.println(ans);
  }
  
  private static int countYakusu(int n) {
    int ret = 0;
    for (int i = 1; i*i <= n; i++) {
      if (n % i == 0) {
        if (n / i == i) {
          ret += 1;
        } else {
          ret += 2;
        }
      }
    }
    return ret;
  }
}