a = input(str("word 1:"))
b = input(str("word 2:"))
m = 0
n = 0
x=0
if m < n:
print(x+(n-m))
else:
while n < len(a):
if a[m] != b[n]:
x=x+1
m = m + 1
n = n + 1
else:
m = m + 1
n = n+1
if n > m:
print(x+(m-n))
else:
while n < len(a):
if a[m] != b[n]:
x=x+1
m = m + 1
n = n + 1
else:
m = m + 1
n = n+1
print(x)
b = input(str("word 2:"))
m = 0
n = 0
x=0
if m < n:
print(x+(n-m))
else:
while n < len(a):
if a[m] != b[n]:
x=x+1
m = m + 1
n = n + 1
else:
m = m + 1
n = n+1
if n > m:
print(x+(m-n))
else:
while n < len(a):
if a[m] != b[n]:
x=x+1
m = m + 1
n = n + 1
else:
m = m + 1
n = n+1
print(x)