#includeint main(){int a,b; scanf("%d",&a); for(b=0;a;a/=10)b=b*10+a%10; printf("%d\n",b); return 0;}