from functools import reduce n= int(input()) def max_num(n): max= [] if n % 2 ==0: while n > 2: max.append(1) n -= 2 else: max.append(7) n -= 3 while n > 2: max.append(1) n == 2 new_max = int(reduce(lambda x, y: x + y, [str(x) for x in max])) print(new_max) max_num()