#include
#include<math.h>
using namespace std;
int main() {
int n;
cin>>n;
int temp=n;
int reverse=0;
int count=0;
while(temp>0){
temp/=10;
count++;
}
while(n>0){
int lastdigit=n%10;
reverse+=lastdigit*pow(10,count-1);
n/=10;
count--;
}
cout<<reverse;
return 0;
}