import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; public class j { Scanner in = new Scanner(System.in); public static void main(String[] args) { j myj = new j(); myj.go(); } public void go() { while(true) { HashMap hm = new HashMap(); int n = in.nextInt(); if(n == 0) break; for(int k = 0; k < n; k++) { String s = in.nextLine(); int count = 0; if(hm.get(s) != null); count = (int)hm.get(s); count++; hm.put(s, count); } for(int k = 0; k < n; k++)//negate from the second list { String s = in.nextLine(); int count = 0; if(hm.get(s) != null); count = (int)hm.get(s); count--; hm.put(s, count); } ArrayList list = new ArrayList(); list = (ArrayList) hm.values(); int wrongs = 0; for(int k = 0; k < list.size(); k++) { if(list.get(k) > 0) wrongs += list.get(k); } System.out.println(n - wrongs); } } }