100 atcoder#ABC105C. [ABC105C] Base -2 Number
[ABC105C] Base -2 Number
Score : points
Problem Statement
Given an integer , find the base representation of .
Here, is the base representation of when the following are all satisfied:
- is a string consisting of
0
and1
. - Unless
0
, the initial character of is1
. - Let , then $S_0 \times (-2)^0 + S_1 \times (-2)^1 + ... + S_k \times (-2)^k = N$.
It can be proved that, for any integer , the base representation of is uniquely determined.
Constraints
- Every value in input is integer.
Input
Input is given from Standard Input in the following format:
Output
Print the base representation of .
-9
1011
As , 1011
is the base representation of .
123456789
11000101011001101110100010101
0
0