N = int(input()) ans = '' if N == 0: # 없으면 틀림 print(0) exit() while N != 0: if N % -2 != 0: ans += '1' N = N//-2 + 1 else: ans += '0' N = N//-2 print(ans[::-1])