import Data.List

main :: IO ()
main = do
  n <- getInt
  putStrLn . concatMap show . reverse . unfoldr f $ n
  where
    f 0 = Nothing
    f x = Just (x `mod` 2, - x `div` 2)

getInt :: IO Int
getInt = readLn
