#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n,sum=0,a,b=10,c=0;
scanf("%d",&n);
while(n%10==0)
n=n/10;
if(n>=0)
{
while(n>sum)
{
a=(n%b-c)/(b/10);
sum=a*(b/10)+sum;
b=10*b;
c=a;
cout<<a;
}
}
if(n<0)
{
cout<<"-";
while(n<sum)
{
a=(n%b-c)/(b/10);
sum=a*(b/10)+sum;
b=10*b;
c=a;
cout<<-a;
}
}
return 0;
}
#include<cstdio>
using namespace std;
int main()
{
int n,sum=0,a,b=10,c=0;
scanf("%d",&n);
while(n%10==0)
n=n/10;
if(n>=0)
{
while(n>sum)
{
a=(n%b-c)/(b/10);
sum=a*(b/10)+sum;
b=10*b;
c=a;
cout<<a;
}
}
if(n<0)
{
cout<<"-";
while(n<sum)
{
a=(n%b-c)/(b/10);
sum=a*(b/10)+sum;
b=10*b;
c=a;
cout<<-a;
}
}
return 0;
}