compute :: Int -> Integer
compute n
 | even n = read (replicate (div n 2) '1')
 | True   = read ('7' : replicate (div n 2 - 1) '1')

main = do
  n <- readLn
  print $ compute n