N = int(input()) if N % 2: answer = '7' + '1' * ((N-3) // 2) else: answer = '1' * (N//2) print(answer)