n = int(input()) a = '1'*(n//4) if n % 2 == 0: print('1'+a) else: print('7'+a)