N = input() result = 0 if (N % 2 == 0): for i in range(N / 2): result += 10**i else: for i in range(N/2): if(i == N/2 - 1): result += 7*(10**i) else: result += 10**i print result