Pascal
var m,n,i,z,p:integer;
begin
readln(m);
readln(n);
for i:=1 to m do
p=n mod 10;
z=z+p;
end;
writeln(z);
end.
Pascal
var m,n,i,z,p:integer;
begin
readln(m);
readln(n);
for i:=1 to m do
begin
p=n mod 10;
z=z+p;
end;
writeln(z);
end.