Pagini recente » Cod sursa (job #2701848) | Cod sursa (job #716104) | Cod sursa (job #18130) | Cod sursa (job #3300565) | Cod sursa (job #560867)
Cod sursa(job #560867)
var n,p,a,b,d,i:longint;
begin
assign(input,'fact.in');reset(input);
assign(output,'fact.out');rewrite(output);
readln(p);
if p=5 then write('-1');
n:=1; b:=1;
//while p<>0 do begin
for i:=1 to n do begin
//if (i mod 2)=0 then inc(a);
if (i mod 5)=0 then inc(b);
d:=n;
inc(n);
end;
// if a>b then if (a-(a-b))=p then write(d);
if b=p then write(d,' ');
//end;
close(input);close(output);
end.