Killjee has N songs in his player. Initial volume of his player is X and highest volume Killjee can hear is Y, After playing ith song killjee can increase the volume of player by Ai.
Can you tell killjee what maximum volume he can achieve without hurting his ears.
INPUT
First line of input contains 3 space separated integer X, Y, N. Second line contains N space separated integers ith of which is Ai.
OUTPUT
Print highest volume that can be achieved.
CONSTRAINTS
1≤X,Y,Ai≤105
X≤Y
1≤N≤103
we can't increase volume in any step.