def main():

    N = int(eval(input()))

    ans = ''



    while N != 0:

        if N % 2 != 0:

            N -= 1

            ans = '1' + ans

        else:

            ans = "0" + ans

        

        N = N // (-2)

        

    if ans == "":

        ans = "0"



    print(ans)



main()
def main():

    N = int(eval(input()))

    if N == 0:

        print((0))

    ans = ''

    base = 1

    while N != 0:

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

            ans += '0'

        else:

            ans += "1"

            N -= base

        base *= -2

    ans = list(ans)

    ans.reverse()

    print((''.join(ans)))



if __name__ == "__main__":

    main()
def main():
    N = int(eval(input()))
    ans = ""
    while N != 0:
        if N % 2 != 0:
            N -= 1
            ans = "1" + ans
        else:
            ans = "0" + ans
        N = N // (-2)
    if ans == "":
        ans = "0"
    print(ans)


main()

def main():
    N = int(eval(input()))
    if N == 0:
        print((0))
    ans = ""
    base = 1
    while N != 0:
        if N % (base * -2) == 0:
            ans += "0"
        else:
            ans += "1"
            N -= base
        base *= -2
    ans = list(ans)
    ans.reverse()
    print(("".join(ans)))


if __name__ == "__main__":
    main()

+    if N == 0: +        print((0)) +    base = 1 -        if N % 2 != 0: -            N -= 1 -            ans = "1" + ans +        if N % (base * -2) == 0: +            ans += "0" -            ans = "0" + ans -        N = N // (-2) -    if ans == "": -        ans = "0" -    print(ans) +            ans += "1" +            N -= base +        base *= -2 +    ans = list(ans) +    ans.reverse() +    print(("".join(ans))) -main() +if __name__ == "__main__": +    main()