open System

[<EntryPoint>]
let main argv =
    
    let line1 = stdin.ReadLine().Split(' ') |> Array.map int
    let dayCount = line1.[0]

    let works = stdin.ReadLine().Split(' ') |> Array.map int

    let allworksCount = Array.sum works

    let ans = dayCount - allworksCount
    
    let adjust = if ans >= 0 then ans 
                 else -1
    
    printfn "%A" adjust

    0