While researching palindromes, JYY accidentally discovered an interesting type of "twisted palindrome."
JYY has two strings, $A$ and $B$, both of length $N$.
A "twisted string" $S(i, j, k)$ is formed by concatenating the substring of $A$ from the $i$-th character to the $j$-th character with the substring of $B$ from the $j$-th character to the $k$-th character.
For example, if $A = \text{'XYZ'}$ and $B = \text{'UVW'}$, then the twisted string $S(1, 2, 3) = \text{'XYVW'}$.
JYY defines a "twisted palindrome" as one of the following:
- A palindrome in $A$;
- A palindrome in $B$;
- A palindromic twisted string $S(i, j, k)$.
JYY now wants to find the length of the longest twisted palindrome.
Input
The first line contains a positive integer $N$. The second line contains a string $A$ of length $N$ consisting of uppercase letters. The third line contains a string $B$ of length $N$ consisting of uppercase letters.
Output
The first line contains a single integer, representing the length of the longest twisted palindrome.
Examples
Input 1
5 ABCDE BAECB
Output 1
5
Note
The best twisted palindrome is shown below (characters not in the palindrome are represented by '.'):
.BC.. ..ECB
Constraints
For 10% of the data, $N \le 30$. For 30% of the data, $N \le 200$. For 50% of the data, $N \le 2000$. For 100% of the data, $1 \le N \le 10^5$.