var i:longint;function sum(c:integer):integerbegin sum := c mod 10 + c div 10 mod 100 + c div 100;endBegin for i := 1 to 999999 do if (sum(i div 1000) = sum(i mod 1000) ) then writeln(i);End
var i:longint;
function sum(c:integer):integer
begin
sum := c mod 10 + c div 10 mod 100 + c div 100;
end
Begin
for i := 1 to 999999 do
if (sum(i div 1000) = sum(i mod 1000) ) then
writeln(i);
End