import           Data.List                      ( unfoldr )

main :: IO ()
main = do
  x <- solve <$> readLn
  putStrLn $ if x == "" then "0" else x

solve :: Int -> String
solve = reverse . unfoldr f . negate
 where
  f x =
    let (v, m) = x `divMod` (-2)
    in  if x == 0 then Nothing else Just (if m /= 0 then '1' else '0', v)
