#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
void solve(){
	ll n; cin >> n;
	string res = to_string(n);
	reverse(res.begin(), res.end());
	cout << stoll(res);
}
int main (){
	int test = 1; //cin >> test;
	while(test--) solve(), cout << "\n";
}
