EasyRating 900
No Twin Letters
Delete as few characters as possible so that no two neighbouring characters are equal. Print the number of deletions.
Input
A string of A and B.
Output
One integer.
Sample 1
Input
AAAA
Output
3
Sample 2
Input
ABABAB
Output
0
Output appears here