def main():

    N = int(eval(input()))



    def to_bin(n):

        """

        n:10進数 -> 2進数

        """

        if n == 0:

            return 0

        digits = []

        i = 0

        base = 1

        while n != 0:

            if n % (base*2) == 0:

                digits.append("0")

            else:

                digits.append("1")

                n -= base

            i += 1

            base *= -2

        return "".join(digits[::-1])



    print((to_bin(N)))





if __name__ == '__main__':

    main()

def main():

    N = int(eval(input()))



    def to_bin(n):

        """

        n:10進数 -> 2進数

        """

        if n == 0:

            return 0

        digits = []

        i = 0

        base = 1

        while n != 0:

            if n % (base*-2) == 0:

                digits.append("0")

            else:

                digits.append("1")

                n -= base

            i += 1

            base *= -2

        return "".join(digits[::-1])



    print((to_bin(N)))





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))

    def to_bin(n):
        """
        n:10進数 -> 2進数
        """
        if n == 0:
            return 0
        digits = []
        i = 0
        base = 1
        while n != 0:
            if n % (base * 2) == 0:
                digits.append("0")
            else:
                digits.append("1")
                n -= base
            i += 1
            base *= -2
        return "".join(digits[::-1])

    print((to_bin(N)))


if __name__ == "__main__":
    main()

def main():
    N = int(eval(input()))

    def to_bin(n):
        """
        n:10進数 -> 2進数
        """
        if n == 0:
            return 0
        digits = []
        i = 0
        base = 1
        while n != 0:
            if n % (base * -2) == 0:
                digits.append("0")
            else:
                digits.append("1")
                n -= base
            i += 1
            base *= -2
        return "".join(digits[::-1])

    print((to_bin(N)))


if __name__ == "__main__":
    main()

-            if n % (base * 2) == 0: +            if n % (base * -2) == 0: