#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
cin>>a;
b=a/100;
c=a/10;
d=c%10;
e=a%10;
f=e*100+d*10+b*1;
cout<<f<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKaW50IGEsIGIsIGMsIGQsIGUsIGY7CmNpbj4+YTsJCmI9YS8xMDA7CmM9YS8xMDsKZD1jJTEwOwplPWElMTA7CmY9ZSoxMDArZCoxMCtiKjE7CmNvdXQ8PGY8PGVuZGw7CglyZXR1cm4gMDsKfQ==