LearnPy Hub
← Arena
EasyRating 900

Count the Runs

Count the number of runs (maximal blocks of equal adjacent characters) in the string.

Input

One line.

Output

A count.

Sample 1

Input
aaabbc
Output
3

Sample 2

Input
a
Output
1
solution.py
Output appears here
Count the Runs · Python Arena problem · LearnPy Hub