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