Huseyn's game#11389

Huseyn's game

1 second
128 megabytes
Easy

Huseyn has a string consisting of characters and . To entertain himself, he came up with the following game. Huseyn can perform one of two operations on the string:

For example, from the string , Huseyn can obtain or .

You are given a string obtained after all of Huseyn's operations (it is possible that he did not perform any operation). Determine the smallest possible length the string could have initially had.

Input

A single string of length no more than 10^5, consisting only of characters and .

Output

Print the smallest possible length of the string that Huseyn could have initially had.

Examples

Example 2

Loading
Loading

Example 1

Loading
Loading