#include<bits/stdc++.h>using namespace std;int main(){ int n,a=0; cin>>n; while(n){ a*=10; a+=n%10; n/=10; } cout<<a<<'\n';}