import java.util.*;
public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);

    int n, count;
    boolean[] p;

    void run(){
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    }  

    void setP(){
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);

    int n, count;
    boolean[] p;

    void run(){
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    }  

    void setP(){
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n n count; count boolean[] p; p public static void main(String[] args){
	new Main().run();
    } main {
	new Main().run();
    } new Main().run() new Main().run new Main() String[] args args void run(){
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    } run {
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    } count = 0 count 0 p = new boolean[100000000] p new boolean[100000000] 100000000 setP() setP while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	} sc.hasNext() sc.hasNext sc {
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	} n = sc.nextInt() n sc.nextInt() sc.nextInt sc if(p[n]) {
		count++;
	     	p[n] = false;
	    } p[n] p n {
		count++;
	     	p[n] = false;
	    } count++ count p[n] = false p[n] p n false System.out.println(count) System.out.println System.out System System.out count void setP(){
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    } setP {
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    } Arrays.fill(p, true) Arrays.fill Arrays p true p[0] = p[1] = false p[0] p 0 p[1] = false p[1] p 1 false for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false; int i=2; int i=2; i 2 i<p.length i p.length p p.length i++ i++ i if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false; if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false; p[i] p i for(int j=i*2; j<p.length; j+=i)
		    p[j] = false; int j=i*2; int j=i*2; j i*2 i 2 j<p.length j p.length p p.length j+=i j+=i j i p[j] = false; p[j] = false p[j] p j false public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);

    int n, count;
    boolean[] p;

    void run(){
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    }  

    void setP(){
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    }
} public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);

    int n, count;
    boolean[] p;

    void run(){
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    }  

    void setP(){
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);

    int n, count;
    boolean[] p;

    void run(){
	count = 0;
	p = new boolean[100000000];
	setP();
	while(sc.hasNext()){
	    n = sc.nextInt();
	    if(p[n]) {
		count++;
	     	p[n] = false;
	    }
	}
	System.out.println(count);
    }  

    void setP(){
	Arrays.fill(p, true);
	p[0] = p[1] = false;
	for(int i=2; i<p.length; i++)
	    if(p[i])
		for(int j=i*2; j<p.length; j+=i)
		    p[j] = false;
    }
}