lampice
문제
2*N light bulbs are arranged in two rows and N columns. Each light bulb can be either off or on, and all lights are initially off.
We want to turn some of them on so that they form a beautiful pattern. In one step we can change the state of a sequence of (one or more) consecutive light bulbs in the same row or column.
Given the desired pattern, write a program that finds the minimum number of steps required to form the pattern.
입력
The first line of input contains an integer N, 1 ≤ N ≤ 10,000, the number of columns.
Each of the following two lines contains a sequence of N characters representing the desired final pattern.
Character '1' indicates a light bulb that should be on in the final state, while the character '0' indicates a light bulb that should be off.
출력
The first and only line of output should contain a single integer – the minimum number of steps required.
예제
예제 1
3 100 000
1
예제 2
5 11011 11011
3
예제 3
20 11101101111000101010 01111101100000010100
7