N = int(input()) ans = [] while N >= 4: ans.append(1) N -= 2 if N == 2: ans.append(1) else: ans.append(7) ans.reverse() print(*ans, sep="")