
import java.util.Scanner;
public class Main {

	public static void main (String [] args) {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	}
		public static boolean isPrime(int i) {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			}
		}
		
		
		
		

	
	


 import java.util.Scanner; Scanner java.util public class Main {

	public static void main (String [] args) {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	}
		public static boolean isPrime(int i) {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			}
		} Main public static void main (String [] args) {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	} main {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	} int count = 0; count 0 Scanner in = new Scanner(System.in); in new Scanner(System.in) while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		} in.hasNextInt() in.hasNextInt in {
			if(isPrime(in.nextInt())) {
				count++;
			}
		} if(isPrime(in.nextInt())) {
				count++;
			} isPrime(in.nextInt()) isPrime in.nextInt() in.nextInt in {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String [] args args public static boolean isPrime(int i) {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			} isPrime {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			} if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				} i == 2 || i == 3 i == 2 i 2 i == 3 i 3 {
				return true;
			} return true; true if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				} i % 2 == 0 || i % 3 == 0 i % 2 == 0 i % 2 i 2 0 i % 3 == 0 i % 3 i 3 0 {
				return false;
			} return false; false {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				} for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				} int j = 5; int j = 5; j 5 j * j <= i j * j j j i j += 6 j += 6 j 6 {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				} {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				} if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					} (i % j == 0) || (i % (j + 2) == 0) (i % j == 0) i % j i j 0 (i % (j + 2) == 0) i % (j + 2) i (j + 2) j 2 0 {
						return false;
					
					} return false; false return true; true int i i public class Main {

	public static void main (String [] args) {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	}
		public static boolean isPrime(int i) {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			}
		} public class Main {

	public static void main (String [] args) {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	}
		public static boolean isPrime(int i) {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			}
		} Main

import java.util.Scanner;
public class Main {

	public static void main (String [] args) {
		int count = 0;
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()) {
			if(isPrime(in.nextInt())) {
				count++;
			}
		}
		
		System.out.println(count);
	}
		public static boolean isPrime(int i) {
			
			
			if(i == 2 || i == 3) {
				return true;
			}
			
			else if (i % 2 == 0 || i % 3 == 0) {
				return false;
			}
			
			
		
			else {
			
				for(int j = 5; j * j <= i; j += 6) {
					
					if((i % j == 0) || (i % (j + 2) == 0)) {
						return false;
					
					}
				}
				
				return true;
						
						
				}
			
		
			}
		}
		
		
		
		

	
	



