import qualified Data.ByteString.Char8 as B
import Data.Attoparsec.ByteString.Char8

main :: IO ()
main = do
  (n, as) <- parseOnly input <$> B.getContents
  print $ solve n as

input :: Parser (Int, [Int])
input = (,)
  <$> decimal <* endOfLine
  <*> decimal `sepBy` space <* endOfInput

solve :: Int -> [Int] -> Int
solve n as = sum as - n
