program sum_cifr_5_chisel;
var
x, sum, i:int64;
begin
i:=1;
sum:=0;
while i<=5 do
read(x);
while x>0 do
sum:=sum+x mod 10;
x:=x div 10
end;
inc(i);
write(sum)
end.
program sum_cifr_5_chisel;
var
x, sum, i:int64;
begin
i:=1;
sum:=0;
while i<=5 do
begin
read(x);
while x>0 do
begin
sum:=sum+x mod 10;
x:=x div 10
end;
inc(i);
end;
write(sum)
end.