N = int(input()) Q = N // 2 R = N % 2 MaxNum = 0 for i in range(Q - 1): MaxNum += 10**i if R == 1: MaxNum += 7 * 10**(Q - 1) print(MaxNum)