#include using namespace std; int main() { int a; cin >> a; while (a) { cout << a % 10; a /= 10; } return 0; }