CSES - KILO 2016 1/5 - Stones
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Uolevi has n stones. Each of the stones is either red, green or blue. The stones are in a row in Uolevi's table. Uolevi wonders how many stones he must remove from the table so that any two neighboring stones have different colors. Count the minimum amount of stones to remove.

Input

The input contains string S, representing the colors of stones in the table. The ith character of S is R if the ith stone is red, G if the ith stone is green and B if the ith stone is blue.

Output

Output one integer, the number of stones Uolevi has to remove.

Constraints

  • 1 \le |S| \le 50

Examples

Input:

GGGR

Output:

2

Input:

BBBBB

Output:

4

Input:

BRGBG

Output:

0