The stage sound system has a volume between and , inclusive.
Someone presses a sequence of buttons during the performance:
+ increases the volume by one, unless it is already .
- decreases the volume by one, unless it is already .
Given the starting volume and the button presses, determine the final volume.
The first line contains and : the number of presses and the starting volume.
The second line contains characters, each + or -.
Print the final volume.
In Sample 1, the volume becomes , , , , and finally .
In Sample 2, the first two presses do nothing. The next two increase the volume to .
| Sample Input 1 | Sample Output 1 |
|---|---|
5 99 +++-- |
98 |
| Sample Input 2 | Sample Output 2 |
|---|---|
4 0 --++ |
2 |