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