# できる限り桁数を増やす

N = int(input())
match_list = []

while N > 3:
    match_list.append(1)
    N -= 2

if N == 3:
    match_list.append(7)
    match_list.sort(reverse=True)
    N -= 3
elif N == 2:
    match_list.append(1)
    N -= 2
else:
    pass

# 配列をstr型に、joinで繋げて出力

print(''.join(map(str, match_list)))