Dr. Neil Watts, a Technician Specialist at Sigmund Corp., has developed a prototype machine that is capable of modifying the memories of terminally ill patients. He represents these memories using strings.
In this scenario, we use two strings of the same length, denoted as $$$S$$$ and $$$T$$$. Both of these strings are composed of only lowercase English letters. The string $$$S$$$ represents the patient's original memories, while the string $$$T$$$ represents the target memories. The ultimate goal is to perform several operations on string $$$S$$$ until it becomes identical to string $$$T$$$.
The memory modification machine performs operations using a basic function called rshift k where $$$1\le k \le 25$$$. This function changes a letter to the $$$k$$$-th letter following it in the alphabet. In this context, the letter following $$$\texttt{z}$$$ is considered to be $$$\texttt{a}$$$.
However, due to the potential for memory modifications to alter the course of the timeline, Dr. Watts can only apply the rshift k operation to a suffix of string $$$S$$$ during each operation. The value of $$$k$$$ and the length of the suffix can be arbitrarily chosen for each operation.
For instance, the string $$$\texttt{uvwxyz}$$$ would be $$$\texttt{uvzabc}$$$ if rshift 3 is applied to the suffix beginning with $$$\texttt{w}$$$.
As excessive memory operations can lead to unintended consequences, Dr. Watts needs to minimize the number of operations performed. Therefore, he needs your help to determine the minimum number of operations required to transform string $$$S$$$ into string $$$T$$$.
The first line contains an integer $$$n$$$ ($$$1\le n\le 2\cdot 10^5$$$), denoting the length of strings.
The second line contains a string $$$S$$$ consisting of $$$n$$$ lowercase English letters.
The third line contains a string $$$T$$$ consisting of $$$n$$$ lowercase English letters.
Output an integer representing the minimum number of operations required to transform string $$$S$$$ into string $$$T$$$.
4 aaaa aaaa
0
9 aaaaaaaaa aaabbbaaa
2
17 sofiawilumerrymee sofiawillumarryme
8
32 takethesebrokenwingandlearntofly takethesesunkeneyesandlearntosee
12
| Name |
|---|


