#include<stdio.h>
 
int main(){
  int n,m,i;
  int day=0;
  int a[1000000000];
  
  scanf("%d",&n);
  scanf("%d",&m);
  
  for(i=0;i<n-1;i++){
    scanf("%d",&a[i]);
    day=day+a[i];
  }
  
  n=n-day;
  
  if(n>=0)
    printf("%d",n);
  else
    printf("-1");
  
  return 0;
}