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.移动后,字符串的长度减少$$$1$$$。如果字符串为空,则无法选择该字符串。
例如:
- 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.最终,两个字符串有可能都等于空字符串,因此彼此相等。 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.
输入
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 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.
示例
输入 #1
test west
输出 #1
2
输入 #2
codeforces yes
输出 #2
9
输入 #3
test yes
输出 #3
7
输入#4
b ab
输出#4
1
注意
在第一个示例中,您应该对第一个字符串应用一次移动,并对第二个字符串应用一次移动。结果,两个字符串都等于“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.结果是相同的字符串“yes”$$$\to$$$“es”。
在第三个示例中,只有完全删除字符串才能使它们相等。也就是说,最终两个字符串都将为空。
In the fourth example, the first character of the second string should be deleted.