N = int(input()) if N == 0 or N == 1: print(0) elif N % 2 == 0: print("1"*(N//2)) else: print("7"+ "1"*(N//2-1))