var
n,s:integer;
begin
repeat
write ('N = ');readln(n);
until (n>=10000) and (n<=32767);
s:=n div 10000 + (n div 1000) mod 10 + n mod 10;
writeln ('Summa: ',s);
readln;
end.
var
n,s:integer;
begin
repeat
write ('N = ');readln(n);
until (n>=10000) and (n<=32767);
s:=n div 10000 + (n div 1000) mod 10 + n mod 10;
writeln ('Summa: ',s);
readln;
end.