uses crt;
var n,i,dem,dem1,j,k,dem2,x:integer;
begin
clrscr;
write('nhap n='); readln(n);
dem:=0;
i:=1;
while i<=n do
begin
dem:=dem+1;
inc(i);
end;
writeln('So cac so tu nhien trong khoang tu 1 toi ',n,' la: ',dem);
dem1:=0;
j:=1;
while j<=n do
begin
if j mod 2=1 then inc(dem1);
inc(j);
end;
writeln('So cac so le trong khoang tu 1 toi ',n,' la: ',dem1);
if n>1 then
begin
k:=2;
dem2:=0;
repeat
x:=1;
repeat
inc(x);
until (k mod x=0) or (x=k);
if x=k then inc(dem2);
k:=k+1;
until k=n+1;
end;
writeln('So cac so nguyen to trong khoang tu 1 toi ',n,' la: ',dem2);
readln;
end.