400786: GYM100247 H Secret Information
Description
Little known hacker Heaven just got access to the secret information about problems of some major programming contest. He wants to change statement of one of the problems to sabotage the contest.
For Heaven, initial and target statements are just strings of zeroes and ones. He can take any substring of initial statement and negate it — replace each zero with one, and each one with zero.
Heaven would like to leave no trace of his actions, so he wants to minimize the number of steps in turning initial statement to target.
InputThe first line contains one integer n (1 ≤ n ≤ 200000) — the length of the strings.
Then two strings of «0» and «1» follow — the binary codes of initial and target statement.
OutputOutput one integer — the minimal possible number of steps.
ExamplesInput6Output
101010
110011
2Input
7Output
1010101
0011100
3