#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<map>
#include<vector>
#include<set>
#define inf 0x7fffffff
#define ll long long
#define ull unsigned long long
#define fi first
#define se second
using namespace std;
char s[1000];
int main()
{
freopen("reverse.in","r",stdin);
freopen("reverse.out","w",stdout);
scanf("%s",s);
if(s[0]=='-')
{
printf("-");
int len=strlen(s);
while(s[len-1]=='0')len--;
for(int i=len-1;i>=1;i--)
printf("%c",s[i]);
}
else
{
int len=strlen(s);
while(s[len-1]=='0')len--;
for(int i=len-1;i>=0;i--)
printf("%c",s[i]);
}
return 0;
}