uses
SysUtils;
var
num, reversNum: String;
j: Char;
i: Integer;
begin
ReadLn(num);
reversNum := num;
for i := 1 to Length(num) div 2 do
j := reversNum[i];
reversNum[i] := reversNum[Length(num) - i + 1];
reversNum[Length(num) - i + 1] := j;
end;
WriteLn(strtoint(num) + strtoint(reversNum));
end.
uses
SysUtils;
var
num, reversNum: String;
j: Char;
i: Integer;
begin
ReadLn(num);
reversNum := num;
for i := 1 to Length(num) div 2 do
begin
j := reversNum[i];
reversNum[i] := reversNum[Length(num) - i + 1];
reversNum[Length(num) - i + 1] := j;
end;
WriteLn(strtoint(num) + strtoint(reversNum));
end.