a = int(input()) if a<2: result = 0 elif a%2 == 0: result = '1'*int(a/2) else : result = '7' + '1' * (int(a/2) - 1) print (result)