G. Coin Game
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Alice and Bob are very smart guys and they like to play all kinds of games in their spare time. The most amazing thing is that they always find the best strategy, and that's why they feel bored again and again. They just invented a new game, as they usually did. They are playing with coins. They have a row of $1 and $2 coins. They want to change this row so that all $1's are grouped together and all $2's are grouped together. They are just allowed to swap two neighbor coins. Using the best strategy what is the minimum number of swaps required to do this task?

Input

Each test case is a line with a string composed of 1 and 2. (1 ≤ length of the input string ≤ 25000)

Output

Print the minimum number of swaps required to do this task.

Examples
Input
221212
Output
3