There are M rows of benches in a classroom. N students come to the classroom one-by-one and take a seat. Every student contains a preferred number. The rows are numbered from 1 to N and the maximum capacity of all the rows is K. The students come to the class in a sequential manner starting from 1 to N and follow these rules for the seating arrangement:
Your task is to determine the total number of students who cannot sit in their preferred row.
Note: This includes the students that did not get a seat at all.
Input format
Output format
Print the total number of students who cannot sit in their preferred row.
Constraints
1≤N,M≤105
1≤K≤500
1≤Ai≤M
Student 4 and student 5 did not get their preferred seats.