a = int(input()) num = 0 if a%2 == 0: b =int(a/2) for i in range(0,b): c =10**i num += c print(num) else: b =int(a/2) for i in range(0,b-1): c =10**i num += c d = num + 10**(b-1)*7 print(d)