- Time limit: 1.00 s
- Memory limit: 512 MB
Input
The only input line has a bit string of length $n$.
Output
Print one integer: the minimum number of inversions.
Constraints
- $1 \le n \le 10^6$
Input:
011001
Output:
2
Explanation: You can invert the third and fourth bit, and the resulting string is 010101.