#include <iostream>
using namespace std;
const int TEN = 10;
int main() {
int a;
cin >> a;
int reverseA = 0;
while (a) {
reverseA = reverseA * TEN + a % TEN;
a /= TEN;
}
cout << reverseA;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IFRFTiA9IDEwOwoKaW50IG1haW4oKSB7CiAgICBpbnQgYTsKICAgIGNpbiA+PiBhOwogICAgaW50IHJldmVyc2VBID0gMDsKCiAgICB3aGlsZSAoYSkgewogICAgICAgIHJldmVyc2VBID0gcmV2ZXJzZUEgKiBURU4gKyBhICUgVEVOOwogICAgICAgIGEgLz0gVEVOOwogICAgfQogICAgY291dCA8PCByZXZlcnNlQTsKICAgIHJldHVybiAwOwp9