n, a = int(input()), 0 for i in range(n//2): a = a + 10**i print(a + (n%2)*6*10**((n//2)-1))