from itertools import combinations def Next(): return input() def NextInt(): return int(Next()) def NextInts(): return map(int,input().split()) def Nexts(): return map(str,input().split()) def NextIntList(): return list(map(int,input().split())) def RowInts(n): return [int(input()) for i in range(n)] s = "1212" for i in range(3, 10): for j in range(2**(i-1)): s += str(i) N = int(input()) print(s[:N])