Program gt;
var s,a,b,c,n:longint;
begin
read(n);
a:=n div 100;
b:=(n mod 100)div 10;
c:=n mod 10;
s:=a+b+c;
writeln(s);
end.
2)
program gt;
label 1;
var p,n,i,j:longint;
begin
read(n);
for i:=2 to n do
begin
if(n mod i=0)then begin
p:=round(sqrt(i));
for j:=2 to p do
begin
if(i mod j=0)then goto 1;
end;
writeln(i);
1:
end;
end;
end.