program osszead01;
var a,b,c : char;
x,y,z,m : byte;
BEGIN
readln(a);
readln(b);
x := ORD(a)-ORD('0');
y := ORD(b)-ORD('0');
z := x + y;
m := z DIV 10;
z := z MOD 10;
c := CHR(z+ORD('0'));
writeln(c);
writeln('carry=',m);
END.
program osszead02;
var a,b : string;
BEGIN
readln(a);
readln(b);
if length(a) <> length(b) then
if length(a) < length(b) then
begin
while length(a) < length(b) do
a := '0'+a;
end
else
begin
while length(b) < length(a) do
b := '0'+b;
end;
writeln(a);
writeln(b);
END.