Program n_1;
var x:integer;
begin
readln(x);
x:=(x mod 10) + ((x div 10) mod 10) + ((x div 100) mod 10);
writeln(x);
end.
Program n_1;
var x:integer;
begin
readln(x);
x:=(x mod 10) + ((x div 10) mod 10) + ((x div 100) mod 10);
writeln(x);
end.