Paulinha is training for the SBC Programming Marathon and has a clear goal: to advance to the national stage, which will be held in the Liberdade neighborhood of São Paulo. She knows that to do so, she needs to solve at least $$$K$$$ problems.
Paulinha is extremely intelligent and can solve any problem, regardless of the topic, but there is one small problem: Paulinha simply hates graph questions.
Your task is to help Paulinha figure out the minimum number of graph problems she needs to solve to reach her goal.
The first line consists of integers $$$N$$$ ($$$1 \le N \le 10^5$$$), representing the total number of topics, the minimum number of problems $$$K$$$ ($$$1 \le K \le \sum_{i=1}^{N} a_i$$$) that Paulinha needs to solve to pass the stage, and an integer $$$G$$$ ($$$1 \le G \le N$$$), the index corresponding to the graph problems.
The second line contains $$$N$$$ integers, $$$a_1, a_2, \dots, a_{N}$$$, where $$$a_i$$$ ($$$1 \le a_i \le 1000$$$) represents the number of questions available for topic $$$i$$$.
Output a single integer, the minimum number of graph questions that Paulinha needs to solve to pass the level.
3 5 33 1 2
1
5 7 21 2 2 3 1
0