N = int(input()) A = [] while N != 0: if N >= 5 and N%2 == 1: A.append("7") N -= 3 if N == 2 or N >=4: A.append("1") N -= 2 print("".join(A))