#include<stdio.h>
#include<math.h>

int main()
{
	long int N, M;
	scanf("%ld %ld", &N, &M);
	
	int A[M];
	int r;
	for(r=0; r<N; r++){
		scanf("%d", &A[r]);
		N = N - A[r];
	}
	
	printf("%ld", N);
	
	return 0;
	
}
