N = int(input()) P = N // 2 - 1 M = N - (P * 2) if M == 3: ans = '7' + '1' * P else: ans = '1' * (P + 1) print(ans)