Program HOC24;
const fi='sn.inp';
var f: text;
i,n,d: integer;
a: array[1..32000] of integer;
function nt(x: integer): boolean;
var j: integer;
begin
nt:=true;
if (x=2) or (x=3) then exit;
nt:=false;
if (x=1) or (x mod 2=0) or (x mod 3=0) then exit;
j:=5;
while j<=trunc(sqrt(x)) do
begin
if (x mod j=0) or (x mod (j+2)=0) then exit;
j:=j+6;
end;
nt:=true;
end;
procedure ip;
begin
assign(f,fi);
reset(f);
n:=1;
while not(eof(f)) do
begin
read(f,a[n]);
inc(n);
end;
d:=0;
for i:=1 to n-1 do
if nt(a[i]) then d:=d+1;
close(f);
end;
begin
ip;
write(d);
readln
end.
uses crt;
const fi='sn.inp';
var f1:text;
a:array[1..100]of integer;
i,n,kt,j,dem:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eoln(f1) do
begin
inc(n);
read(f1,a[n]);
end;
dem:=0;
for i:=1 to n do
if a[i]>1 then
begin
kt:=0;
for j:=2 to a[i]-1 do
if a[i] mod j=0 then kt:=1;
if kt=0 then inc(dem);
end;
writeln(dem);
close(f1);
readln;
end.