#include <bits/stdc++.h>
using namespace std;
struct poo {
  int i, j, ct;
};
bool cmp(poo x, poo y) { return x.ct < y.ct; }
int main() {
  int n;
  cin >> n;
  string last[n];
  for (int i = 0; i < n; i++) {
    cin >> last[i];
  }
  string curr[n];
  for (int i = 0; i < n; i++) {
    cin >> curr[i];
  }
  int c = 0;
  map<int, int> go, done;
  vector<poo> ans;
  for (int i = 0; i < n; i++) {
    bool flag = false;
    int k = INT_MAX, x = -1;
    for (int j = 0; j < n; j++) {
      if (go[j] == 1)
        continue;
      else if (curr[i] == last[j]) {
        flag = true;
        done[i] = 1;
        go[j] = 1;
        break;
      } else if (curr[i].size() == last[j].size()) {
        int g = 0;
        for (int z = 0; z < curr[i].size(); z++) {
          if (curr[i][z] != last[j][z]) {
            g++;
          }
        }
        if (g < k) {
          k = g;
          x = j;
        }
      }
    }
    if (!flag) {
      poo h;
      h.i = i;
      h.j = x;
      h.ct = k;
      ans.push_back(h);
    }
  }
  sort(ans.begin(), ans.end(), cmp);
  for (int i = 0; i < ans.size(); i++) {
    if (go[ans[i].j] == 0) {
      done[ans[i].i] = 1;
      go[ans[i].j] = 1;
      c += ans[i].ct;
    }
  }
  for (int i = 0; i < n; i++) {
    if (done[i] == 0) {
      for (int j = 0; j < n; j++) {
        if (go[j] == 0 and curr[i].size() == last[j].size()) {
          int g = 0;
          for (int z = 0; z < curr[i].size(); z++) {
            if (curr[i][z] != last[j][z]) {
              g++;
            }
          }
          c += g;
          go[j] = 1;
        }
      }
    }
  }
  cout << c << endl;
}
