Codehorses has just hosted the second Codehorses Cup. This year, the same as the previous one, organizers are giving T-shirts for the winners.

The valid sizes of T-shirts are either "M" or from $0$ to $3$ "X" followed by "S" or "L". For example, sizes "M", "XXS", "L", "XXXL" are valid and "XM", "Z", "XXXXL" are not.

There are $n$ winners to the cup for both the previous year and the current year. Ksenia has a list with the T-shirt sizes printed for the last year cup and is yet to send the new list to the printing office. 

Organizers want to distribute the prizes as soon as possible, so now Ksenia is required not to write the whole list from the scratch but just make some changes to the list of the previous year. In one second she can choose arbitrary position in any word and replace its character with some uppercase Latin letter. Ksenia can't remove or add letters in any of the words.

What is the minimal number of seconds Ksenia is required to spend to change the last year list to the current one?

The lists are unordered. That means, two lists are considered equal if and only if the number of occurrences of any string is the same in both lists.


-----Input-----

The first line contains one integer $n$ ($1 \le n \le 100$) — the number of T-shirts.

The $i$-th of the next $n$ lines contains $a_i$ — the size of the $i$-th T-shirt of the list for the previous year.

The $i$-th of the next $n$ lines contains $b_i$ — the size of the $i$-th T-shirt of the list for the current year.

It is guaranteed that all the sizes in the input are valid. It is also guaranteed that Ksenia can produce list $b$ from the list $a$.


-----Output-----

Print the minimal number of seconds Ksenia is required to spend to change the last year list to the current one. If the lists are already equal, print 0.


-----Examples-----
Input
3
XS
XS
M
XL
S
XS

Output
2

Input
2
XXXL
XXL
XXL
XXXS

Output
1

Input
2
M
XS
XS
M

Output
0



-----Note-----

In the first example Ksenia can replace "M" with "S" and "S" in one of the occurrences of "XS" with "L".

In the second example Ksenia should replace "L" in "XXXL" with "S".

In the third example lists are equal.

Difficulty: interview

Starter code:

Solutions:
from collections import defaultdict
n = int(input())
d = defaultdict(int)
r = 0
for i in range(n):
    d[input()] += 1
for i in range(n):
    s = input()
    if d[s]:
        d[s] -= 1
    else:
        r += 1
print(r)


from collections import Counter

n = int(input())
a = Counter(input() for i in range(n))
b = Counter(input() for i in range(n))
res = 0

for c in "MLS":
    res+= abs(a[c] - b[c])
    res+= abs(a["X"+c] - b["X"+c])
    res+= abs(a["XX"+c] - b["XX"+c])
    res+= abs(a["XXX"+c] - b["XXX"+c])
print(res//2)

n = int(input())

a = []
b = []

for i in range(n):
    a.append(input())

for i in range(n):
    b.append(input())
counter = 0
for i in range(n):
    if (a[i] not in b):
        counter+=1
    else:
        b.remove(a[i])

print(counter)



n = int(input())
a = []
for i in range(n):
    a.append(input())
b = []
for i in range(n):
    b.append(input())
c = n
for i in a:
    if i in b:
        c -= 1
        b.remove(i)
print(c)


import sys
import io

stream_enable = 0

inpstream = """
3
XS
XS
M
XL
S
XS
"""

if stream_enable:
    sys.stdin = io.StringIO(inpstream)
    input()

def inpmap():
    return list(map(int, input().split()))

n = int(input())
a = []
b = []
for i in range(n):
    a.append(input())
for i in range(n):
    b.append(input())
m = 0
for x in a:
    if x in b:
        b.remove(x)
    else:
        m += 1
print(m)


n = int(input())
a = dict()
for i in ['S', 'XS', 'XXS', 'XXXS', 'M', 'L', 'XL', 'XXL', 'XXXL']: a[i] = 0
for _ in ' ' * n: a[input()] += 1
for _ in ' ' * n: a[input()] -= 1
s = 0
for i in a: s += abs(a[i])
print(s // 2)


n=int(input())
a,b=[],[]
for i in range(n):
	a.append(input())
for i in range(n):
	b.append(input())
C=['S','M','L','XL','XXL','XXXL','XS','XXS','XXXS']
d=[]
for s in C:
	if(a.count(s)-b.count(s))<0:
		d.append(-(a.count(s)-b.count(s)))
print(sum(d))


n = int(input())
prev = []
this = []
for i in range(n):
    prev.append(input())
for i in range(n):
    this.append(input())
for i in range(n):
    if prev[i] in this:
        this.remove(prev[i])
print(len(this))


n = int(input())
x = ['M', 'S', 'L', 'XS', 'XXS', 'XXXS', 'XL', 'XXL', 'XXXL']
a = [0] * len(x)
b = [0] * len(x)
for i in range(n):
    a[x.index(input())] += 1
for i in range(n):
    b[x.index(input())] += 1

ans = 0
for i in range(len(a)):
    xx = min(a[i], b[i])
    a[i] -= xx
    b[i] -= xx
    
for i in a:
    ans += i
            
print(ans)

from collections import Counter

n = int(input())
a = Counter(input().strip() for _ in range(n))
b = Counter(input().strip() for _ in range(n))

for sz in ['M', 'L', 'XL', 'XXL', 'XXXL', 'S', 'XS', 'XXS', 'XXXS']:
    m = min(a[sz], b[sz])
    a[sz] -= m
    b[sz] -= m

ans = 0

for num_x in range(1, 4):
    old = a['X' * num_x + 'S'] + a['X' * num_x + 'L']
    new = b['X' * num_x + 'S'] + b['X' * num_x + 'L']
    assert old == new
    ans += old

old = a['M'] + a['S'] + a['L']
new = b['M'] + b['S'] + b['L']
assert old == new
ans += old

print(ans)


n=int(input())
a=[]
b=[]
ans=0

for _ in range(n):
    s=input()
    a.append(s)

for i in range(n):
    s=input()
    if s in a:
        a.remove(s)

print(len(a))


n = int(input())
clothes = {}
for i in range(n):
    size = input()
    if size not in clothes:
        clothes[size] = 0
    clothes[size] += 1
    
ans = 0
for i in range(n):
    size = input()
    if size not in clothes or clothes[size] == 0:
        ans += 1
    else:
        clothes[size] -= 1 

print(ans)


n = int(input().strip())
ans=0
d = {'S':0,'M':0,'L':0,'XS':0,'XL':0,'XXS':0,'XXL':0,'XXXS':0,'XXXL':0,}
for i in range(n):
	d[input().strip()]+=1
d2 = {'S':0,'M':0,'L':0,'XS':0,'XL':0,'XXS':0,'XXL':0,'XXXS':0,'XXXL':0,}
for i in range(n):
	d2[input().strip()]+=1
for i in d2.keys():
	ans+=max(d2[i]-d[i],0)
print(ans)

n = int(input())
num = []
for i in range(n):
    s = input()
    num.append(s)
num2 = []
for i in range(n):
    s = input()
    num2.append(s)
i = 0
ans = 0
while i < len(num):
    if num[i] in num2:
        num2.pop(num2.index(num[i]))
        num.pop(i)
    else:
        i += 1
while len(num):
    x = num[0]
    if True:
        best = -1
        min_el = 10000
        for i in range(len(num2)):
            if (len(num2[i]) == len(x)):
                ans += 1
                num2.pop(i)
                num.pop(0)
                break
print(ans)

def ii():
    return int(input())
def mi():
    return map(int, input().split())
def li():
    return list(mi())

n = int(input())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(n)]

ans = 0
c = [0, 0, 0]
d = [0, 0, 0]
for i, ss in enumerate(['S', 'L', 'M']):
    c[i] = a.count(ss)
    d[i] = b.count(ss)
    x = min(c[i], d[i])
    c[i] -= x
    d[i] -= x
ans += sum(d)
c = [0, 0]
d = [0, 0]
for i, ss in enumerate(['XS', 'XL']):
    c[i] = a.count(ss)
    d[i] = b.count(ss)
    x = min(c[i], d[i])
    c[i] -= x
    d[i] -= x
ans += sum(d)
c = [0, 0]
d = [0, 0]
for i, ss in enumerate(['XXS', 'XXL']):
    c[i] = a.count(ss)
    d[i] = b.count(ss)
    x = min(c[i], d[i])
    c[i] -= x
    d[i] -= x
ans += sum(d)
c = [0, 0]
d = [0, 0]
for i, ss in enumerate(['XXXS', 'XXXL']):
    c[i] = a.count(ss)
    d[i] = b.count(ss)
    x = min(c[i], d[i])
    c[i] -= x
    d[i] -= x
ans += sum(d)

print(ans)

arr = "M S L XL XS XXL XXS XXXL XXXS"
arr.split(" ")
n = int(input())
a=[]
b=[]
for i in range(n):
  s=input()
  a.append(s)

for i in range(n):
  s=input()
  b.append(s)
lol=[]
for i in b:
  if(i in a):
    a[a.index(i)]='1'
  else:
    lol.append(i)
print(len(lol))




t=int(input())
pre=[]
curr=[]
for i in range(t):
    s1=input()
    pre.append(s1)
for i in range(t):
    s2=input()
    curr.append(s2)
z=0
for i in range(t):
    if pre[i] in curr:
        curr.remove(pre[i])
        pass
    else:
        z+=1
print(z)

n = int(input())
pre = []
cur = []
for i in range(n):
    pre.append(input())

for i in range(n):
    cur.append(input())

num = 0
for i in range(n):
    if pre[i] in cur:
        cur.remove(pre[i])
    else:
        num += 1
print(num)

n=int(input())
a={'M':0,'S':0,'L':0,'XL':0,'XXL':0,'XXXL':0,'XS':0,'XXS':0,'XXXS':0}
b={'M':0,'S':0,'L':0,'XL':0,'XXL':0,'XXXL':0,'XS':0,'XXS':0,'XXXS':0}
ans=0
for i in range(n):
    a[input()]+=1
for i in range(n):
    b[input()]+=1
for i in a:
    a[i]=max(a[i]-b[i],0)
for i in a:
    ans+=a[i]
print(ans)
    


n  = int(input())
a = []
b = []
for i in range(n):
  a.append(input())
for i in range(n):
  k = input()
  if k in a:
    a.remove(k)  
  else:
    b.append(k)
c = [0,0,0,0]
for i in range(len(a)):
  c[len(a[i])-1] += 1
print(sum(c))


n = int(input())
a = {}
b = {}
for i in range(n):
    temp = input()
    if temp in a:
        a[temp]+=1
    else: a[temp] = 1
for i in range(n):
    temp = input()
    if temp in b:
        b[temp]+=1
    else: b[temp] = 1
counter = 0
for i in b.keys():
    if i in a:
        if b[i] > a[i]:
            b[i] -= a[i]
        else: b[i] = 0
    counter += b[i]
print(counter)

# -*- coding: utf-8 -*-

n = int(input())
A = [input() for _ in range(n)]
B = [input() for _ in range(n)]
for i in ['M', 'S', 'XS', 'XXS', 'XXXS', 'L', 'XL', 'XXL', 'XXXL']:
    while i in A and i in B:
        del A[A.index(i)]
        del B[B.index(i)]
print(len(A))


n=int(input())
arr1=[]
arr2=[]
for _ in range(n):
    arr1+=[input()]
for _ in range(n):
    arr2+=[input()]

for word in arr1:
    if word in arr2:
        arr2.remove(word)
print(len(arr2))
    


#1
n = int(input())
a = []
b = []
d = 0
for i in range(n):
    a.append(input())
for i in range(n):
    b.append(input())
for i in range(n):
    if(not(a[i] in b)):
        d+=1
    else:
        for j in range(n):
            if(b[j] == a[i]):
                b.remove(b[j])
                break
print(d)