#include int main(){ int m,n; scanf("%d",&m); n=0; while(m) { n=n*10+m%10; m/=10; } printf("%d\n", n); return 0;}