uses crt;
const fi='tep.txt'
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 eof(f1) do
begin
n:=n+1;
readln(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.