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