package no237; import java.util.HashSet; import java.util.Scanner; public class Main { public static long[] felmatPrime = {3,5,17,257,65537}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); HashSet hs = new HashSet<>(); for(int i=0;i<32;i++) { long x = 1; for(int j=0;j<5;j++) { if ((i >> j & 1) == 1) { x *= felmatPrime[j]; } } while(x <= a) { hs.add(x); x <<= 1; } } System.out.println(hs.size() - 2); } }