 var a,b:string;
 i,s:integer;
  f:boolean;
begin
assign (input,'input.txt');reset(input);
assign (output,'output.txt');rewrite(output);
read(a);
i:=1;
while i<>(length(a)+1) do
begin
s:=1;
f:=true;
while f=true do
if a[i]=a[i+1] then begin s:=s+1;i:=i+1; end else f:=false;
write(s,a[i]);
i:=i+1;
end;

  { TODO -oUser -cConsole Main : Insert code here }
end.

