#!/bin/python

import math
import os
import random
import re
import sys

# Complete the makeAnagram function below.
def makeAnagram(a, b):
    st1 = dict()
    st2 = dict()
    c=0;
    for i in a:
        st1[i] = st1.setdefault(i,0)+1
    for j in b:
        st2[j] = st2.setdefault(j,0)+1
    for k in st1:
        if k in st2:
            c+=min(st1[k],st2[k])
            #print c
    return ((len(a)-c)+(len(b)-c))

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    a = raw_input()

    b = raw_input()

    res = makeAnagram(a, b)

    fptr.write(str(res) + '\n')

    fptr.close()
