Bob is biking on a trail with sections. This trail has uphills, downhills, and flat sections, denoted by
F, respectively. He starts with a speed of , and will bike through the entire trail. When biking:
- On uphill sections, Bob will lose unit of speed.
- On downhill sections, Bob will gain unit of speed.
- On flat sections, Bob's speed will not change.
If Bob's speed becomes , he will have to get off his bike and walk until he reaches either a downhill section or the end of the trail. His speed cannot be negative.
How many total sections will Bob have to walk on?
The first line will contain two space-separated integers and .
The second and final line will contain a string of length with only the characters
Output one integer on one line, the number of sections Bob will have to walk on.
11 1 FUDDDUDUUUF
Bob has to walk the second section and from the tenth section to the end of the trail, as in these sections, his speed is .