#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int a, b=0, i;
	cin>>a;
	i=a;
	while(i>0) {
		b=b*10+i%10;
		i=i/10;
	}
	return 0;
}