You are given two strings and . In 1 operation you can do one of the following:
- Remove a character from
- Insert a character into
- Replace a character in with another character.
What is the number of operations to turn the string into .
Input
The first line will contain the string . The second line will contain the string .
Output
Output the minimum number of operations to turn the string into .
Constraints
Example 1
Input
bbababbbab
ababbabbbb
Output
3
Example 2
Input
eadbeadcbc
bebbbceeca
Output
8
Example 3
Input
ebdccedbcbbdddcedeab
abdcbcaaeababddedbcd
Output
12
Comments