#include<stdio.h>
int main()
{
int a,b,c,d,n;
scanf("%d",&n);
a=n/100;
b=(n-a*100)/10;
c=n%10;
d=c*100+b*10+a;
printf("%d",d);
return 0;
}
#include<stdio.h>
int main()
{
int a,b,c,d,n;
scanf("%d",&n);
a=n/100;
b=(n-a*100)/10;
c=n%10;
d=c*100+b*10+a;
printf("%d",d);
return 0;
}