EasyRating 800
Neighbouring Stones
Stones in a row are R, G or B. Print how many stones to remove so that no two neighbours have the same colour.
Input
n, then a string.
Output
A count.
Sample 1
Input
3 RRG
Output
1
Sample 2
Input
5 RRRRR
Output
4
Output appears here