Var
num, sum, a, b, c: integer;
function isEqual(Sum1, Sum2: integer): boolean;
begin
result := (Sum1 = Sum2)
end;
begin
read(num);
sum := num div 100 + (num div 10) mod 10 + num mod 10;
for a := 1 to 9 do
for b := 0 to 9 do
for c := 0 to 9 do
if isEqual(sum, a + b + c) then
writeln(a*100 + b*10 + c);
end.