var a:real;
b:integer;
begin
readln(a);
b:=round(a*1000)mod 1000;
write(b div 100 + b mod 10 + b mod 100 div 10);
end.
var a:real;
b:integer;
begin
readln(a);
b:=round(a*1000)mod 1000;
write(b div 100 + b mod 10 + b mod 100 div 10);
end.