_10to2' :: Int -> String
_10to2' 0 = "0"
_10to2' 1 = "1"
_10to2' n 
 | digit == 0  = _10to2' rem ++ "0"
 | otherwise   = init (_10to2' (n-1)) ++ "1"
 where (rem, digit) = divMod n (-2)
 
main = putStrLn =<< _10to2'.read <$> getLine