Best Editor

Time Limit: 1 Second    Memory Limit: 32768 KB

To convert one string to another string, you can do the following operations:

1. Back and delete a character(backspace)
Move the cursor back one column and delete the character on that place.
2. Insert a character
Insert any character at the cursor's position, and the cursor moves one column forward.
3. Overwrite a character
Overwrite the character at the cursor's position with another character, and the cursor moves one column forward.
4. Move back
The cursor moves one column backward.
5. Move forward
The cursor move one column forward.

As you are the best editer, you want to minimize the number of operations. The question is to find the minimum number of operations. Assume that the cursor is at the end of the first string at the beginning.

Input

There are multiple test cases(less than 60). Each test case consists of two lines, the first line is the initial string and the second is the target string. All the input strings' length is less than or equal to 100. Proceed until the end of file.

Output

For each test case you should print exactly one line containing the answer.

Sample Input

abc
bc
abc
abcd

Sample Output

3
1

Submit

Source: ZOJ Monthly, November 2004