var x,c,p:integer;
begin
p:=1;
readln(x);
while x>0 do begin
c:=c + x mod 2*p;
x:=x div 2;
p:=p*10
end;
write(c)
end.
var x,c,p:integer;
begin
p:=1;
readln(x);
while x>0 do begin
c:=c + x mod 2*p;
x:=x div 2;
p:=p*10
end;
write(c)
end.