import java.util.*;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		boolean is_prime = true;
		Integer[] prime_10 = {2, 3, 5, 7};
		ArrayList<Integer> prime_100 = new ArrayList<Integer>(Arrays.asList(prime_10));
		for(int i = 10; i < 100; i++){
			is_prime = true;
			for(int j = 0; j < prime_10.length; j++){
				if(i %  prime_10[j] == 0){
					is_prime = false;
					break;
				}
			}
			if(is_prime){
				prime_100.add(i);
			}
		}

		ArrayList<Integer> prime_10000 = new ArrayList<Integer>();
		for(int i = 2; i < 10000; i++){
			is_prime = true;
			for(int j = 0; j < prime_100.size(); j++){
				Integer prime = prime_100.get(j);
				if(i != prime&& i % prime == 0){
					is_prime = false;
					break;
				}
			}
			if(is_prime){
				prime_10000.add(i);
			}
		}

		ArrayList<Integer> result = new ArrayList<Integer>();
		while(s.hasNext()){
			Integer number = Integer.parseInt(s.next());
			is_prime = true;
			if(result.contains(number)){
				continue;
			}
			for(int j = 0; j < prime_10000.size(); j++){
				Integer prime = prime_10000.get(j);
				if(!number.equals(prime) && number % prime == 0){
					is_prime = false;
					break;
				}
			}
			if(is_prime){
				result.add(number);
			}
		}
		System.out.println(result.size());
		s.close();
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz