s = input()
t = input()
n = len(s)

from collections import Counter
s_c, t_c = Counter(s), Counter(t)

count = 0
for c in t:
    if c not in s_c:
        count += 1
    else:
        if s_c[c]:
            s_c[c] -= 1
        else:
            count += 1
        
print(count)


5e2f4dcdb207a58946bd277fa38904889ae78d40
<mask token>

<mask token>
for c in t:
    if c not in s_c:
        count += 1
    elif s_c[c]:
        s_c[c] -= 1
    else:
        count += 1
print(count)

s = input()
t = input()
n = len(s)
<mask token>
s_c, t_c = Counter(s), Counter(t)
count = 0
for c in t:
    if c not in s_c:
        count += 1
    elif s_c[c]:
        s_c[c] -= 1
    else:
        count += 1
print(count)

s = input()
t = input()
n = len(s)
from collections import Counter
s_c, t_c = Counter(s), Counter(t)
count = 0
for c in t:
    if c not in s_c:
        count += 1
    elif s_c[c]:
        s_c[c] -= 1
    else:
        count += 1
print(count)

s = input()
t = input()
n = len(s)

from collections import Counter
s_c, t_c = Counter(s), Counter(t)

count = 0
for c in t:
    if c not in s_c:
        count += 1
    else:
        if s_c[c]:
            s_c[c] -= 1
        else:
            count += 1
        
print(count)

