For which test case my code is wrong

submission link

Question has asked to receive M+3 numbers, your program will receive B+3

test-case
7 2 4
0 6 4 5
your output : 2
but expected output is : 3

I correct the mistake . But it still showing wrong answer

thanks for the awesome information.