#include<iostream>
#include<cstring>
#define index 100000
using namespace std;
int main ()
{
int num1[index],num2[index],carry[index],ans[index];
int c;
string a;
while(cin>>a)
{
c=0;
for(int i=0;i<index;i++)
{
num1[i]=0;
num2[i]=0;
carry[i]=0;
ans[i]=0;
}
for(int i=0;i<a.length();i++)
{
num1[c]=a[i]-'0';
c++;
}
c=0;
for(int i=a.length()-1;i>=0;i--)
{
num2[c]=a[i]-'0';
c++;
}
for(int i=0;i<a.length();i++)
{
ans[i]=(num1[i]+num2[i])%10+carry[i];
carry[i+1]=(num1[i]+num2[i])/10;
}
if(carry[a.length()]!=0)
cout<<(num1[a.length()]+num2[a.length()])%10+carry[a.length()];
for(int i=a.length()-1;i>=0;i--)
{
cout<<ans[i];
}
cout<<endl;
}
return 0;
}