program p26760;
var a:longint;b:array[1..10000]of longint;i,j,k:longint;
begin
readln(a);
i:=0;
while a<>0 do
begin
k:=a mod 8;i:=i+1;b[i]:=k;
a:=a div 8;
end;
for j:=i downto 1 do
write(b[j]);
writeln;
end.
标签:2015