inputs = [] input_line = input().split() for i in input_line: inputs.append(int(i)) sum = 0 syou = int(inputs[0] / 2) amari = int(inputs[0] % 2) for i in range(syou): sum += 10**i if amari == 1: sum += 6 * 10 ** (syou - 1) print(sum)