LearnPy Hub
← Arena
AdvancedRating 2000

The Strange Printer

A printer prints a run of one repeated letter anywhere in one turn, covering what was there. Print the fewest turns to print the given string.

Input

One string (length ≤ 100).

Output

One integer.

Sample 1

Input
aaabbb
Output
2

Sample 2

Input
aba
Output
2
solution.py
Output appears here
The Strange Printer · Python Arena problem · LearnPy Hub