Pagini recente » Cod sursa (job #1519001) | Cod sursa (job #1383712) | Cod sursa (job #1702110) | Cod sursa (job #2468602) | Cod sursa (job #509387)
Cod sursa(job #509387)
program ciur;
var x,i,n,nr:longint;
cond:boolean;
f,g:text;
begin
assign (f,'ciur.in'); reset (f);
assign (g,'ciur.out'); rewrite (g);
x:=3;
nr:=0;
read (f,n);
while (x<=n) do begin cond:=true;
for i:=2 to x div 2 do if (x mod i=0) then cond:=false;
if (cond=true) then nr:=nr+1;
x:=x+2;
end;
writeln (g,nr+1);
close (f);
close (g);
end.