CodingSlave 1.0 is a brand new text editor. There are two possible operations to compose a string in CodingSlave 1.0:
Initially, the current string is empty.
Given a word consisting of lowercase English letters, calculate the minimum number of operations needed to compose this string.
The first line contains a string S consisting of lowercase English letters (1≤∣S∣≤106).
Print one integer: the minimum number of operations needed to compose S using CodingSlave 1.0.