main :: IO () main = do input_line <- getLine let numberlist = map area input_line :: [Int] let ln2 = length input_line * 2 let ans = ln2 + 1 + sum numberlist putStrLn $ show ans return () area :: Char -> Int area a | a == '8' = 2 | a == '4' || a == '6' || a == '9' = 1 | otherwise = 0