var
x, a, b, c, s: integer;
begin
x := 154;
a := x div 100;
b := x mod 100;
c := x mod 10;
s := a + b + c;
writeln(s)
end.
ответ: 59