There are *n* stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that any two neighboring stones had different colors. Stones in a row are considered neighboring if there are no other stones between them.
The first line contains integer *n* (1 ≤ *n* ≤ 50) — the number of stones on the table. 

The next line contains string *s*, which represents the colors of the stones. We'll consider the stones in the row numbered from 1 to *n* from left to right. Then the *i*-th character *s* equals "R", if the *i*-th stone is red, "G", if it's green and "B", if it's blue.
# Ideas for solving:

"""
First input tells us the number of characters
in the string. The second input is the string.

If any two neighboring letters of the string are
the same, we need to add 1 to a counter. So,
RBB would be 1. BBB would be 2. BBRBB is 2.

I think I want to cycle through the string as
a list and compare the index values to eachother.
If they're the same, add 1 to the counter. Then,
print the counter.
"""
# Gets first input from the judge.
firstInput = int(input())

# Gets input string from the judge.
inputString = input()

# Turns the string into a list of characters
list = list(inputString)

# Create counter
counter = 0

# for index values, except the last one
for i in range(firstInput - 1):
    # if two neighboring index values are the same, add 1
    if list[i] == list[i+1]:
        counter += 1

print(counter)
