#include <iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
if (n == 0)cout << 0;
for(long long j = n; j!=0;)
{
if (j % 10 != 0)
{
cout << j % 10;
}
else {
if (j < 0)cout << "-";
}
if (j < 0)j = abs(j / 10);
else j = j / 10;
}
return 0;
}