t = [1] for i in range(2, 10): for j in range(1 << (i - 1)): t.append(i) t.append(1) print(*(t[:int(input())]), sep='')