-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = interact $ show . foldr1 (-) . map sum . zipWith ($) ((map ((4*).length) . drop 2) : zipWith (.) [drop 2, take 2] (replicate 2 (map (sum .map (length.show))))) . replicate 3 . zipWith ($) (map (filter.(.)(==0)) (const 0 : map (flip mod) [15, 5, 3])) . replicate 4 . map read . words