let f (s:System.String) = s.Split(' ') |> Seq.map int64 let m = stdin.ReadLine() |> f |> Seq.toList |> function | [k;n;f] -> k*n | _ -> failwith "error!" let s = stdin.ReadLine() |> f |> Seq.sum if s > m then -1L else m-s |> printfn "%d"