to hai2k9
program bai3;
uses crt;
var n : string;
tam,m,i : longint;
BEGIN
clrscr;
readln(n);
m := 0;
for i := 1 to length(n) do
begin
val(n[i], tam);
m := m+tam;
end;
writeln(m);
END.