
divMod' n d
  | r < 0 = (q+1, r-d)
  | otherwise = qr
  where
    qr@(q,r) = divMod n d

ntb :: Int -> [Bool]
ntb n 
  | n==0 = [False]
  | otherwise = go n []
  where
    go 1 bs = True:bs
    go n bs =
      let (q,r) = n `divMod'` (-2)
      in
        go q ((r==1):bs)

b True = '1'
b False = '0'

main = do
  n <- read <$> getLine
  putStrLn $ map b $ ntb n
