Program HOC24;
var i,t,d: byte;
code: integer;
s: string;
begin
write('Nhap xau: '); readln(s);
write('Xau so: ');
t:=0;
for i:=1 to length(s) do
if s[i] in ['0'..'9'] then
begin
write(s[i]);
val(s[i],d,code);
t:=t+d;
end;
writeln;
write('Xau chu: ');
for i:=1 to length(s) do if s[i] in ['A'..'z'] then write(s[i]);
writeln;
write('Tong cac con so cua xau so: ',t);
readln
end.