def f(fir, sz): ret = '' if fir == 0: ret += '01' * (sz // 2) if sz % 2 == 1: ret += '0' else: ret += '10' * (sz // 2) if sz % 2 == 1: ret += '1' return ret def g(l): odd, even = [], [] for i in l: if i % 2 == 1: odd.append(i) else: even.append(i) odd = sorted(odd) even = sorted(even) res = '' for i in odd: res += f(0, i) fir = 0 for i in even: res += f(fir, i) fir ^= 1 return res n = int(input()) res = '2' for i in range(int(n ** 0.5), 0, -1): q = [i] m = n - i ** 2 while m: p = int(m ** 0.5) q.append(p) m -= p ** 2 if res == '2': res = g(q) else: s = g(q) if len(s) < len(res): res = s elif len(s) == len(res): res = min(res, s) print(res)