You are given two strings $s$ and $t$. In a single move, you can choose any of two strings and delete the first (that is, the leftmost) character. After a move, the length of the string decreases by $1$. You can't choose a string if it is empty.
For example:
* by applying a move to the string "_where_", the result is the string "_here_",
* by applying a move to the string "_a_", the result is an empty string "".
You are required to make two given strings equal using the fewest number of moves. It is possible that, in the end, both strings will be equal to the empty string, and so, are equal to each other. In this case, the answer is obviously the sum of the lengths of the initial strings.
Write a program that finds the minimum number of moves to make two given strings $s$ and $t$ equal.
## Input
The first line of the input contains $s$. In the second line of the input contains $t$. Both strings consist only of lowercase Latin letters. The number of letters in each string is between 1 and $2\cdot10^5$, inclusive.
## Output
Output the fewest number of moves required. It is possible that, in the end, both strings will be equal to the empty string, and so, are equal to each other. In this case, the answer is obviously the sum of the lengths of the given strings.
[samples]
## Note
In the first example, you should apply the move once to the first string and apply the move once to the second string. As a result, both strings will be equal to "_est_".
In the second example, the move should be applied to the string "_codeforces_" $8$ times. As a result, the string becomes "_codeforces_" $\to$ "_es_". The move should be applied to the string "_yes_" once. The result is the same string "_yes_" $\to$ "_es_".
In the third example, you can make the strings equal only by completely deleting them. That is, in the end, both strings will be empty.
In the fourth example, the first character of the second string should be deleted.
给你两个字符串 $s$ 和 $t$。在一次操作中,你可以选择任意一个字符串,并删除其第一个(即最左边的)字符。操作后,该字符串的长度减少 $1$。如果一个字符串为空,则不能选择它。
例如:
你需要使用最少的操作次数,使两个给定字符串相等。可能最终两个字符串都变为空字符串,此时它们自然相等。在这种情况下,答案显然是初始字符串长度之和。
编写一个程序,求使两个给定字符串 $s$ 和 $t$ 相等所需的最少操作次数。
输入的第一行包含 $s$,第二行包含 $t$。两个字符串仅由小写拉丁字母组成。每个字符串的长度在 $1$ 到 $2 \dot.op 10^5$ 之间(含端点)。
请输出所需的最少操作次数。可能最终两个字符串都变为空字符串,此时它们相等。在这种情况下,答案显然是给定字符串长度之和。
在第一个例子中,你应该对第一个字符串执行一次操作,对第二个字符串执行一次操作。结果,两个字符串都变为 "_est_"。
在第二个例子中,应对字符串 "_codeforces_" 执行 $8$ 次操作,结果变为 "_codeforces_" $arrow.r$ "_es_"。应对字符串 "_yes_" 执行一次操作,结果为 "_yes_" $arrow.r$ "_es_"。
在第三个例子中,你只能通过完全删除两个字符串使它们相等,即最终两个字符串都为空。
在第四个例子中,应删除第二个字符串的第一个字符。
## Input
输入的第一行包含 $s$,第二行包含 $t$。两个字符串仅由小写拉丁字母组成。每个字符串的长度在 $1$ 到 $2 \dot.op 10^5$ 之间(含端点)。
## Output
请输出所需的最少操作次数。可能最终两个字符串都变为空字符串,此时它们相等。在这种情况下,答案显然是给定字符串长度之和。
[samples]
## Note
在第一个例子中,你应该对第一个字符串执行一次操作,对第二个字符串执行一次操作。结果,两个字符串都变为 "_est_"。在第二个例子中,应对字符串 "_codeforces_" 执行 $8$ 次操作,结果变为 "_codeforces_" $arrow.r$ "_es_"。应对字符串 "_yes_" 执行一次操作,结果为 "_yes_" $arrow.r$ "_es_"。在第三个例子中,你只能通过完全删除两个字符串使它们相等,即最终两个字符串都为空。在第四个例子中,应删除第二个字符串的第一个字符。
**Definitions**
Let $ s, t \in \Sigma^* $ be two non-empty strings over the alphabet $ \Sigma $ of lowercase Latin letters.
Let $ |s| $ and $ |t| $ denote the lengths of $ s $ and $ t $, respectively.
**Constraints**
- $ 1 \leq |s|, |t| \leq 2 \cdot 10^5 $
**Objective**
Find the minimum number of moves to make $ s $ and $ t $ equal, where each move consists of deleting the first character of either string.
Let $ s = s_1 s_2 \dots s_{|s|} $, $ t = t_1 t_2 \dots t_{|t|} $.
Define $ \ell = \max \{ k \in \mathbb{N}_0 \mid \forall i \in \{1, \dots, k\},\ s_{|s| - k + i} = t_{|t| - k + i} \} $,
i.e., $ \ell $ is the length of the longest common suffix of $ s $ and $ t $.
Then the minimum number of moves is:
$$
|s| + |t| - 2\ell
$$