from math import sqrt n = int(input()) def square_number_list(n, current_list): if n == 0: return current_list base = int(sqrt(n)) if base == sqrt(n): return current_list + [base] else: return square_number_list(n - base * base, current_list + [base]) candidate = square_number_list(n, []) def make_candidate_binary(candidate): current_binary = 0 current_string = "" for number in candidate: for i in range(0, number): current_string += str(current_binary) if i < number - 1: current_binary = 0 if current_binary == 1 else 1 return current_string print("".join(make_candidate_binary(candidate)))