#agc037a. [agc037_a]Dividing a String

[agc037_a]Dividing a String

Problem Statement

Given is a string SS consisting of lowercase English letters. Find the maximum positive integer KK that satisfies the following condition:

  • There exists a partition of SS into KK non-empty strings S=S1S2...SKS=S_1S_2...S_K such that SineqSi+1S_i \\neq S_{i+1} (1leqileqK11 \\leq i \\leq K-1).

Here S1S2...SKS_1S_2...S_K represents the concatenation of S1,S2,...,SKS_1,S_2,...,S_K in this order.

Constraints

  • 1leqSleq2times1051 \\leq |S| \\leq 2 \\times 10^5
  • SS consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

SS

Output

Print the maximum positive integer KK that satisfies the condition.


Sample Input 1

aabbaa

Sample Output 1

4

We can, for example, divide SS into four strings aa, b, ba, and a.


Sample Input 2

aaaccacabaababc

Sample Output 2

12