#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,f,e;
scanf("%d",&a);
b=a%10;
c=a/10%10;
d=a/100%10;
f=b*100+c*10+d*1;
e=a+f;
printf("%d",e);
return 0;
}
/**************************************************************
Problem: 1020
User: toughuatao1
Language: C++
Result: Accepted
Time:8 ms
Memory:2076 kb
****************************************************************/