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