n = int(input()) ans = [] while n >= 5: print(ans.append('1')) n -= 2 if n == 4: ans.append('1') ans.append('1') elif n == 3: ans.append('7') elif n == 2: ans.append('1') ans.sort(reverse=1) print(''.join(ans))