n = int(input()) parity = 0 if n % 2 == 0 else 1 print("1" * int(n / 2) if parity == 0 else "7" + "1" * int((n-3) / 2))