#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+PiBhOwogICAgaW50IHJldmVyc2VBID0gMDsKICAgIHdoaWxlIChhKSB7CiAgICAgICAgcmV2ZXJzZUEgPSByZXZlcnNlQSAqIFRFTiArIGEgJSBURU47CiAgICAgICAgYSAvPSBURU47CiAgICB9CiAgICBjb3V0IDw8IHJldmVyc2VBOwogICAgcmV0dXJuIDA7Cn0=