Problem: problem

$ M $ students will be tested in a classroom with $ N $ seats in a straight line. Seats are numbered $ 1 \ dots N $ from the front, and $ 1 $ per seat can seat $ 1 $ students.

Now each student is sitting in the $ A_1, \ dots, A_M $ seats.

To start the test, the following conditions must be met:

* $ 1 \ dots M $ students are sitting in every seat.



Therefore, we decided to repeat the following operations until the conditions were met.

* Move the student sitting at the back and sit at the front of the vacant seats.



Find the number of operations required to meet the conditions.



output

Output the number of operations required to meet the conditions. Also, output a line break at the end.

Example

Input

6 4
1 4 5 6


Output

2

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 1005

struct LOC{
	LOC(int arg_loc){
		loc = arg_loc;
	}
	bool operator<(const struct LOC &arg) const{ //場所の昇順
		return loc > arg.loc;
	}
	int loc;
};

struct Info{
	Info(int arg_loc){
		loc = arg_loc;
	}
	bool operator<(const struct Info &arg) const{ //場所の降順
		return loc < arg.loc;
	}
	int loc;
};

int N,M;
bool check[NUM];

bool rangeCheck(int pos){

	if(pos >= 1 && pos <= M){
		return true;
	}else{
		return false;
	}
}

int main(){

	scanf("%d %d",&N,&M);

	for(int i = 1; i <= M; i++){
		check[i] = false;
	}

	int tmp,num_filled = 0;
	priority_queue<LOC> to_fill;
	priority_queue<Info> students;

	for(int loop = 0; loop < M; loop++){
		scanf("%d",&tmp);
		check[tmp] = true;
		students.push(Info(tmp));
	}

	for(int pos = 1; pos <= M; pos++){
		if(check[pos]){

			num_filled++;

		}else{

			to_fill.push(LOC(pos));
		}
	}

	int ans = 0;
	int next_fill,pre_student_pos;

	while(num_filled < M){

		next_fill = to_fill.top().loc;
		to_fill.pop();

		pre_student_pos = students.top().loc;
		students.pop();

		num_filled++;
		ans++;

		if(rangeCheck(pre_student_pos)){ //元々生徒がいた場所が、1～Mなら埋める必要が生じる
			num_filled--;
			to_fill.push(pre_student_pos);
		}
	}

	printf("%d\n",ans);

	return 0;
}