main = do
	n <- readLn
	putStrLn $ if n `mod` 2 == 0
		then take (n `div` 2) (repeat '1')
		else '7' : take (n `div` 2 - 1) (repeat '1')