import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	}
} Main public static void main(String[] args) {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	} main {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	} Scanner number = new Scanner(System.in); number new Scanner(System.in) int a  = number.nextInt(); a number.nextInt() number.nextInt number double[] b = new double[a]; b new double[a] a int c = 0; c 0 double d; d for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		} {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		} b[i] = number.nextInt() b[i] b i number.nextInt() number.nextInt number c++ c d = b[i] / 3 d b[i] / 3 b[i] b i 3 for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			} double j = 2; double j = 2; j 2 j < Math.sqrt(b[i]) + 1 j Math.sqrt(b[i]) + 1 Math.sqrt(b[i]) Math.sqrt Math b[i] b i 1 j++ j++ j {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			} {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			} if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				} b[i] % 2 == 0 && b[i] > 2 b[i] % 2 == 0 b[i] % 2 b[i] b i 2 0 b[i] > 2 b[i] b i 2 {
					
					c--;
					break;
				} c-- c break; if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				} b[i] % j == 0 && b[i] != 2 b[i] % j == 0 b[i] % j b[i] b i j 0 b[i] != 2 b[i] b i 2 {
				
					c--;
					break;
				} c-- c break; System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static void main(String[] args) {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner number = new Scanner(System.in);
		int a  = number.nextInt();
		double[] b = new double[a];
		int c = 0;
		double d;

		for(int i = 0;i < a;i++) {
			b[i] = number.nextInt();
			c++;
			d = b[i] / 3;
			for(double j = 2;j < Math.sqrt(b[i]) + 1;j++) {
				if(b[i] % 2 == 0 && b[i] > 2) {
					
					c--;
					break;
				}
				if(b[i] % j == 0 && b[i] != 2) {
				
					c--;
					break;
				}
				
			}
			
		}
		System.out.println(c);
	}
}

