n = int(input()) num = 1 if n == 3: print('7') else: for i in range(n // 2 - 1): num = num * 10 + 1 print(num)