solve :: Int -> Int solve n = read $ go n where go 0 = "" go 1 = "" go n = let (d,m) = n `divMod` 2 in if m == 0 then replicate d '1' else '7' : replicate (pred d) '1' main :: IO () main = do n <- readLn :: IO Int print $ solve n