IIT Gandhinagar has a strong policy against plagiarism. The institute decides to develop a program that measures how different two texts are from each other. Suppose there are two text strings A
and B
, the program should be able to calculate the minimum number of characters that must be added to and/or removed from A
to get B
, called Dissimilarity (or equivalently, the total
numbers of characters that must be added to A and B to make them equal).
First line contains A
Second line contains B
One line containing the Dissimilarity of A to B
0 < Length(A), Length(B) < 200
For example if A
is "written word"
and B
is "kitten purred"
we can delete 4 characters from A
to get "itten rd"
and then add 5 new ones(k,p,u,r,e
) to get B
, such that the total number of characters added or removed from A
to get B
count to 9. Therefore we define the Dissimilarity of A
from B
to be 9.
You are required to write the program to compute the dissimilarity of two texts.