func k n xs = let r = (k * n) - sum xs in case r of _ | r < 0 -> -1 | otherwise -> r main = do [k,n,_] <- map read . words <$> getLine as <- map read . words <$> getLine print $ func k n as