N=int(eval(input()))

S=""

if N==0:

    print((0))

    exit()

while(True):

    if N==1:

        S="1"+S

        break

    if N%2==1:

        S="1"+S

    else:

        S="0"+S

    N-=N%2

    N=N//(-2)

print(S)

def minus2(K):

    if K==1:

        return "1"

    if K==0:

        return "0"

    S=""

    if K%2==1:

        S="1"

    else:

        S="0"

    K-=K%2

    return minus2(-K//2)+S



print((minus2(int(eval(input())))))

N = int(eval(input()))
S = ""
if N == 0:
    print((0))
    exit()
while True:
    if N == 1:
        S = "1" + S
        break
    if N % 2 == 1:
        S = "1" + S
    else:
        S = "0" + S
    N -= N % 2
    N = N // (-2)
print(S)

def minus2(K):
    if K == 1:
        return "1"
    if K == 0:
        return "0"
    S = ""
    if K % 2 == 1:
        S = "1"
    else:
        S = "0"
    K -= K % 2
    return minus2(-K // 2) + S


print((minus2(int(eval(input())))))

-N = int(eval(input())) -S = "" -if N == 0: -    print((0)) -    exit() -while True: -    if N == 1: -        S = "1" + S -        break -    if N % 2 == 1: -        S = "1" + S +def minus2(K): +    if K == 1: +        return "1" +    if K == 0: +        return "0" +    S = "" +    if K % 2 == 1: +        S = "1" -        S = "0" + S -    N -= N % 2 -    N = N // (-2) -print(S) +        S = "0" +    K -= K % 2 +    return minus2(-K // 2) + S + + +print((minus2(int(eval(input())))))