Var s,d,f,g,h,z,v:integer;
begin
write('Введите остаток');Read(s);
if s > 50 then begin d:= s div 50;s:= s - d * 50;end;
if s > 20 then begin f:= s div 20;s:= s - f * 20;end;
if s > 10 then begin g:= s div 10;s:= s - g * 10;end;
if s > 5 then begin h:= s div 5;s:= s - g * h;end;
if s > 2 then beginz:= s div 2;s:= s - g * z;end;
if s > 1 then beginv:= s div 1;s:= s - g * v;end;
writeln('50p =',d,' 20p =',f,' 10p =',g,' 5p =',h,' 2p =',z,' 1p =',v);end.