main = do
    n <- readLn :: IO Int
    putStrLn $ if n == 0 then "0" else solve n

solve n =  concatMap show . reverse $ solve' n 1
     where solve' 0 _ = []
           solve' n k = a : solve' (n - a * (-2)^(k-1)) (k+1)
               where a | n `mod` (2^k) == 0 = 0
                       | otherwise = 1