f c
    | even (round c) =     replicate (round $     c/2) '1'
    | odd  (round c) = '7':replicate (round $ (c-3)/2) '1'
main = putStrLn . f . read =<< getLine