
import std.stdio, std.math, std.conv, std.algorithm, std.array;

int[] decode(int n) {
  int[] res;
  while(n != 0) {
    int k = n % (-10);
    if (k < 0) {
      k += 10;
      n -= 10;
    }
    n /= -10;
    res ~= k;
  }
  return res.reverse;
}

void main() {
  for(int n; readf("%d\n", &n);)
    decode(n).map!(to!(string)).array.join("").writeln;
}