Pagini recente » Cod sursa (job #3201077) | Statistici Goicea Sorin Gabriel (bluesistemgaby) | Profil liviuu | Cod sursa (job #2550211) | Cod sursa (job #1870548)
type tabel=array[0..2000000] of integer;
var t:tabel;i,n,x,k,j:longint;f1,f2:text;
begin
assign(f1,'ciur.in');
assign(f2,'ciur.out');
reset(f1);rewrite(f2);
read(f1,n);
for i:=2 to n do t[i]:=1;
i:=1;
repeat
i:=i+1;
for j:=i*i to n do
if j mod i=0 then t[j]:=0;
until i=7;
for i:=1 to n do
if t[i]=1 then k:=k+1;
writeln(f2,k);
close(f1);close(f2);
end.