Program a1;
uses crt;
var a,ed,sot,des:integer;
begin
ASSIGN (input,'input.txt') reset (input);
ASSIGN (output,'output.txt'); rewrite (output);
writeln (' vvedite chislo');
readln (a);
ed:=a mod 10;
sot:=a div 100;
des:=a div 10 mod 10;
sum:=des+sot+ed;
writeln (sum);
readln;
CLOSE (input); close (output);
end.