Time limit: 1.0s
Memory limit: 256M
You have decided to go hiking on a trail consisting of characters.
Each character will be one of the following:
-representing dry ground
*representing wet mud
Before your trip, you decide to count the number of mud puddles to make sure you're not getting too dirty. Any contiguous sequence of
* is considered one mud puddle.
Given and a string representing the trail, output the total number of mud puddles.
The first line of input contains an integer .
The second line of input contains characters (
*) representing the trail.
Output a single integer, the total number of mud puddles.