#include <stdio.h>

int main(){
 int N,M;
  scanf("%d %d", &N, &M);
  
  int shukudaiNeedDay = N;
  for(int i=0; i<M; i++){
    int A;
   	scanf("%d", &A);
    shukudaiNeedDay -= A;
  }
  printf("%d", shukudaiNeedDay);
}