You are given two parallel roads $$$A$$$ and $$$B$$$ of length $$$n$$$, each consisting of potholes and clear cells. You may choose at most one contiguous segment on each road to undergo construction. All potholes in those segments are removed, but the segments become blocked and cannot be used for travel.
You must travel from cell $$$1$$$ to cell $$$n$$$, starting on either road $$$A$$$ or $$$B$$$, moving only forward or switching roads at the same index — but you cannot enter blocked cells.
Choose your repair segments such that:
Return the maximum number of potholes that can be removed.
Note: Choosing segments from both roads is optional. You may choose a segment from only one road or none at all.
The first line contains a single integer $$$n$$$ $$$(1 \le n \le 2 \cdot 10^5)$$$ — the length of the roads.
The second line contains a string of length $$$n$$$ representing the first road, consisting of characters . and X.
The third line contains a string of length $$$n$$$ representing the second road, consisting of characters . and X.
Print a single integer — the maximum number of potholes that can be removed such that a valid path from position $$$1$$$ to $$$n$$$ still exists.
Input:
5 ..... .....
Output:
0
Input:
7 X.X.X.X X.X.X.X
Output:
4
Input:
7 ...XXXX XXX....
Output:
6