main = getLine >>= solve . map read . words solve :: [Int] -> IO () solve [k, n, _] = getLine >>= print . judge . (k * n -) . foldl (\acc x -> read x + acc) 0 . words where judge x | x < 0 = (-1) | otherwise = x