import 'dart:io';
 
void main(List<String> args) {
  List<int> N = stdin.readLineSync().split(' ').map((i) => int.parse(i)).toList();
  List<int> A = stdin.readLineSync().split(' ').map((i) => int.parse(i)).toList();
  int sum = 0;
  for(int i=0; i<N[1]; ++i) sum = sum + A[i];
  sum = N[0] - sum;
  if(sum<0) sum = -1;
  print(sum);
}