import java.util.Scanner;

public class Main {
	public static void main(String[] args){

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);
			//??????????????¨?????°
			int count = 0;
			//??\??????????????????(?????????)
			while (sc.hasNext()) {
				int num = sc.nextInt();

				//1??¨????????°??\?????§???????????????????????§??????
				for (int i = 2; i < num; i++) {
					if ((num % i) == 0) {
						break;
					}
					//?´???°??????????????????
					count++;
				}
			}
			//????????????
			System.out.println(count);
		}catch (Exception e) {
			System.out.println(e);
		} finally {
			if (sc != null) {
				sc.close();
			}
		}
	}
}