n=int(eval(input()))

def isdig(n):

  if n>=0:

    digit=0

    while n>2**digit:

      n-=2**digit

      digit+=2

  else:

    digit=1

    while n<-2**digit:

      n+=2**digit

      digit+=2

  return digit

x=["0"]*(isdig(n)+1)

while n!=0:

  digit=isdig(n)

  if digit%2==0:

    n-=2**digit

  else:

    n+=2**digit

  x[digit]="1"

x.reverse()

print(("".join(x)))
n=eval(input())

s=[]

n=int(n)

i=0

while n!=0:

  if n%2**(i+1)==0:

    s.append("0")

  else:

    s.append("1")

    n-=(-2)**i

  i+=1

s.reverse()

if s==[]:

  s=["0"]

print(("".join(s)))
n = int(eval(input()))


def isdig(n):
    if n >= 0:
        digit = 0
        while n > 2**digit:
            n -= 2**digit
            digit += 2
    else:
        digit = 1
        while n < -(2**digit):
            n += 2**digit
            digit += 2
    return digit


x = ["0"] * (isdig(n) + 1)
while n != 0:
    digit = isdig(n)
    if digit % 2 == 0:
        n -= 2**digit
    else:
        n += 2**digit
    x[digit] = "1"
x.reverse()
print(("".join(x)))

n = eval(input())
s = []
n = int(n)
i = 0
while n != 0:
    if n % 2 ** (i + 1) == 0:
        s.append("0")
    else:
        s.append("1")
        n -= (-2) ** i
    i += 1
s.reverse()
if s == []:
    s = ["0"]
print(("".join(s)))

-n = int(eval(input())) - - -def isdig(n): -    if n >= 0: -        digit = 0 -        while n > 2**digit: -            n -= 2**digit -            digit += 2 +n = eval(input()) +s = [] +n = int(n) +i = 0 +while n != 0: +    if n % 2 ** (i + 1) == 0: +        s.append("0") -        digit = 1 -        while n < -(2**digit): -            n += 2**digit -            digit += 2 -    return digit - - -x = ["0"] * (isdig(n) + 1) -while n != 0: -    digit = isdig(n) -    if digit % 2 == 0: -        n -= 2**digit -    else: -        n += 2**digit -    x[digit] = "1" -x.reverse() -print(("".join(x))) +        s.append("1") +        n -= (-2) ** i +    i += 1 +s.reverse() +if s == []: +    s = ["0"] +print(("".join(s)))