from collections import deque



S = deque()





def main():

    N = int(eval(input()))



    while N:

        if (abs(N % -2) == 1):

            S.appendleft('1')

            N -= 1

        else:

            S.appendleft('0')

        N //= -2



    if not S:

        S.append('0')



    print((''.join(list(S))))

    return





main()

def main():

    N = int(eval(input()))

    S = ""



    if N == 0:

        print((0))



    else:

        while N:

            if N % 2 != 0:

                S = '1' + S

                N -= 1



            else:

                S = '0' + S



            N //= -2



        print(S)



    return





main()

from collections import deque

S = deque()


def main():
    N = int(eval(input()))
    while N:
        if abs(N % -2) == 1:
            S.appendleft("1")
            N -= 1
        else:
            S.appendleft("0")
        N //= -2
    if not S:
        S.append("0")
    print(("".join(list(S))))
    return


main()

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


main()

-from collections import deque - -S = deque() - - -    while N: -        if abs(N % -2) == 1: -            S.appendleft("1") -            N -= 1 -        else: -            S.appendleft("0") -        N //= -2 -    if not S: -        S.append("0") -    print(("".join(list(S)))) +    S = "" +    if N == 0: +        print((0)) +    else: +        while N: +            if N % 2 != 0: +                S = "1" + S +                N -= 1 +            else: +                S = "0" + S +            N //= -2 +        print(S)