While searching for a spot of something sweet to eat, Winnie-the-Pooh accidentally knocked over a few of his hunny pots. The shattered hunny pots leaked hunny all over his floor. Thankfully, Pooh is well equipped to deal with such situations! He has in his possession several Super Sponges, which are capable of soaking up a pool of hunny, no matter how large. The catch is that each Super Sponge can only soak up a single pool of hunny.

Help Pooh out by counting the number of pools of hunny that are on his floor now, so that he knows how many Super Sponges to use. A pool of hunny is defined by a contiguous region of hunny. Diagonals do not count.

The input will be given as 0 < r, c < 100. The next r lines will each contain c characters. Each character will either be 'H', denoting a spot with hunny in it, or '.', denoting an empty spot.

Output "Oh bother. There are x pools of hunny.", where x is the number of contiguous regions of hunny, disregarding diagonal neighbours. Ignore grammatical mistakes arising from the possibility that x is 1 for a given input case.

Sample Input 1

4 4

Sample Output 1

Oh, bother. There are 3 pools of hunny.

Sample Input 2

3 2

Sample Output 2

Oh, bother. There are 2 pools of hunny.

Submitting .cpp to 'splithunny'

You're not logged in! Click here to login

Compile Errors

Time Limit: 1 Seconds
Memory Limit: 256MB
No. of ACs: 155
Your best score: 0
Source: Dunjudge Archive

Subtask Score
1 100
2 0