#include<bits/stdc++.h>
using namespace std;
int main(){
    int X,S,a,b,c;
    scanf("%d",&X);
    a=X%10;
    b=X/10%10;
    c=X/100%10;
    S=a*100+b*10+c;
    printf("%d",S);
    return 0;
}
/**************************************************************
	Problem: 1028
	User: binzicheng1
	Language: C++
	Result: Accepted
	Time:15 ms
	Memory:2076 kb
****************************************************************/