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

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	}

	public static int primaryNumber(int target) {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	}
}
 import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	}

	public static int primaryNumber(int target) {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int primaryRange = Integer.valueOf(in.readLine()); primaryRange Integer.valueOf(in.readLine()) Integer.valueOf Integer in.readLine() in.readLine in int result = 0; result 0 for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		} int index = 0; int index = 0; index 0 index < primaryRange index primaryRange index++ index++ index {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		} {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		} result += primaryNumber(Integer.valueOf(in.readLine())) result primaryNumber(Integer.valueOf(in.readLine())) primaryNumber Integer.valueOf(in.readLine()) Integer.valueOf Integer in.readLine() in.readLine in System.out.println(result) System.out.println System.out System System.out result String[] args args public static int primaryNumber(int target) {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	} primaryNumber {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	} int count = 0; count 0 boolean isPrime = true; isPrime true int sqrt = (int)Math.sqrt(target); sqrt (int)Math.sqrt(target) Math.sqrt Math target for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		} int i = 2; int i = 2; i 2 i <= sqrt i sqrt i++ i++ i {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		} {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		} if (target % i == 0) {
				isPrime = false;
				break;
			} target % i == 0 target % i target i 0 {
				isPrime = false;
				break;
			} isPrime = false isPrime false break; if (isPrime) {
			++count;
		} isPrime {
			++count;
		} ++count count return count; count int target target public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	}

	public static int primaryNumber(int target) {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	}
} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	}

	public static int primaryNumber(int target) {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	}
} Main

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

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int primaryRange = Integer.valueOf(in.readLine());

		int result = 0;
		for (int index = 0; index < primaryRange; index++) {
			result += primaryNumber(Integer.valueOf(in.readLine()));
		}
		System.out.println(result);
	}

	public static int primaryNumber(int target) {

		int count = 0;
		boolean isPrime = true;
		int sqrt = (int)Math.sqrt(target);

		for (int i = 2; i <= sqrt; i++) {
			if (target % i == 0) {
				isPrime = false;
				break;
			}
		}
		if (isPrime) {
			++count;
		}
		return count;
	}
}

