import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	}
} Main public static void main(String[] args){
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	} main {
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	} ArrayList<Integer> prime = new ArrayList<Integer>(); prime new ArrayList<Integer>() prime.add(2) prime.add prime 2 prime.add(3) prime.add prime 3 prime.add(5) prime.add prime 5 prime.add(7) prime.add prime 7 boolean sieve2[] = new boolean[100]; sieve2 new boolean[100] 100 Arrays.fill(sieve2, true) Arrays.fill Arrays sieve2 true int j = 0; j 0 for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		} int i=0; int i=0; i 0 i<prime.size() i prime.size() prime.size prime i++ i++ i {
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		} {
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		} j = prime.get(i)-1 j prime.get(i)-1 prime.get(i) prime.get prime i 1 while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			} j<100 j 100 {
				sieve2[j] = false;
				j += prime.get(i);
			} sieve2[j] = false sieve2[j] sieve2 j false j += prime.get(i) j prime.get(i) prime.get prime i sieve2[0] = false sieve2[0] sieve2 0 false for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		} int i=0; int i=0; i 0 i<100 i 100 i++ i++ i {
			if(sieve2[i]){prime.add(i+1);}
		} {
			if(sieve2[i]){prime.add(i+1);}
		} if(sieve2[i]){prime.add(i+1);} sieve2[i] sieve2 i {prime.add(i+1);} prime.add(i+1) prime.add prime i+1 i 1 boolean sieve3[] = new boolean[10000]; sieve3 new boolean[10000] 10000 Arrays.fill(sieve3, true) Arrays.fill Arrays sieve3 true for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		} int i=0; int i=0; i 0 i<prime.size() i prime.size() prime.size prime i++ i++ i {
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		} {
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		} j = prime.get(i)-1 j prime.get(i)-1 prime.get(i) prime.get prime i 1 while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			} j<10000 j 10000 {
				sieve3[j] = false;
				j += prime.get(i);
			} sieve3[j] = false sieve3[j] sieve3 j false j += prime.get(i) j prime.get(i) prime.get prime i sieve3[0] = false sieve3[0] sieve3 0 false for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		} int i=0; int i=0; i 0 i<10000 i 10000 i++ i++ i {
			if(sieve3[i]){prime.add(i+1);}
		} {
			if(sieve3[i]){prime.add(i+1);}
		} if(sieve3[i]){prime.add(i+1);} sieve3[i] sieve3 i {prime.add(i+1);} prime.add(i+1) prime.add prime i+1 i 1 Scanner std = new Scanner(System.in); std new Scanner(System.in) int n = Integer.parseInt(std.next()); n Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std int search = 0; search 0 int answer = n; answer n j = 0 j 0 for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		} {
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		} search = Integer.parseInt(std.next()) search Integer.parseInt(std.next()) Integer.parseInt Integer std.next() std.next std while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			} search >= prime.get(j)*prime.get(j) search prime.get(j)*prime.get(j) prime.get(j) prime.get prime j prime.get(j) prime.get prime j {
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			} if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				} search%prime.get(j) == 0 search%prime.get(j) search prime.get(j) prime.get prime j 0 {
					answer--;
					break;
				} answer-- answer break; {
					j++;
					if(j>=prime.size()){break;}
				} j++ j if(j>=prime.size()){break;} j>=prime.size() j prime.size() prime.size prime {break;} break; j = 0 j 0 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
	public static void main(String[] args){
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	}
} public class Main {
	public static void main(String[] args){
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		ArrayList<Integer> prime = new ArrayList<Integer>();
		prime.add(2);
		prime.add(3);
		prime.add(5);
		prime.add(7);

		boolean sieve2[] = new boolean[100];
		Arrays.fill(sieve2, true);
		int j = 0;
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<100){
				sieve2[j] = false;
				j += prime.get(i);
			}
		}
		sieve2[0] = false;

		for(int i=0; i<100; i++){
			if(sieve2[i]){prime.add(i+1);}
		}

		boolean sieve3[] = new boolean[10000];
		Arrays.fill(sieve3, true);
		for(int i=0; i<prime.size(); i++){
			j = prime.get(i)-1;
			while(j<10000){
				sieve3[j] = false;
				j += prime.get(i);
			}
		}
		sieve3[0] = false;
		for(int i=0; i<10000; i++){
			if(sieve3[i]){prime.add(i+1);}
		}


		Scanner std = new Scanner(System.in);
		int n = Integer.parseInt(std.next());
		int search = 0;
		int answer = n;
		j = 0;
		for(int i=0; i<n; i++){
			search = Integer.parseInt(std.next());

			while(search >= prime.get(j)*prime.get(j)){
				if(search%prime.get(j) == 0){
					answer--;
					break;
				}else{
					j++;
					if(j>=prime.size()){break;}
				}
			}
			j = 0;
		}
		System.out.println(answer);
	}
}