import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) if N&1: A = [7] + [1] * ((N-3)//2) else: A = [1] * (N//2) print(''.join(map(str,A)))