#include<bits/stdc++.h> using namespace std; int main() { long long n; scanf("%lld",&n); while(n!=0){ if(n%10==0){ goto st; } printf("%d",n%10); st: n/=10; } return 0; }