Question
Bit Sweep
Lila has a binary string T of length M. In one move, she can select any substring and remove all instances of its submissive character: '0' if there are fewer '0's than '1's, or '1' if there are fewer '1's than '0's. She must perform this move exactly once. Find the maximum number of characters that can be removed.
Input
The first line of the input contains a single integer M.
The second line of the input contains a binary string T of size M.
The second line of the input contains a binary string T of size M.
Output
Print the maximum number of characters that can be removed from the string.
Example
Sample Input
11
00110001000
Sample Output
3
11
00110001000
Sample Output
3