#include <iostream> #include <fstream> using namespace std; ifstream f("stdin.in"); ofstream g("stdout.out"); long x; int a[100000000]; char b[100000000]; int i,j,k,l; int main() { f>>x; i=1; while(x!=0){ a[i]=x%10; x=x/10; //cout<<a[i]<<" "; if(x>0){ k++; b[k]='-'; } //cout<<b[i]<<" "; i++; } //cout<<i; for(j=i-1 ;j>=1;j--) { g<<a[j]; if(k>0) { g<<b[k]; k--; } } //for(l=k;l>=1;l--) g<<b[l]; return 0; }