#include<bits/stdc++.h>
usinh namespace std;
int amin(){
    int n;
    cin>>n;
    int temp=n;
    int rev=0;
    while(temp>0){
        rev=(rev*10)+(temp%n);
        temp/=10;
    }
    cout<<rev<<endl;
    
}