import Control.Applicative ((<$>)) main :: IO () main = do solve <$> getl read >>= putStrLn solve :: Int -> String solve n = let m = n `div` 2 in if even n then replicate m '1' else '7' : replicate (m - 1) '1' getl :: (String -> a) -> IO a getl f = f <$> getLine