#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int pen[N][N];
int n;
char a[N][N], b[N][N];
int cal(int x, int y) {
  int n = strlen(b[x] + 1), m = strlen(a[y] + 1);
  if (n != m) return 1000000007;
  int res = 0;
  for (int i = (1); i <= (n); i++) res += (b[x][i] != a[y][i]);
  return res;
}
void solve(int testcase) {
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> b[i] + 1;
  for (int i = (1); i <= (n); i++) cin >> a[i] + 1;
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (n); j++) {
      pen[i][j] = cal(i, j);
    }
  }
  int ans = 0;
  set<int> s;
  for (int j = (1); j <= (n); j++) {
    int mn = 1000000007, idx = -1;
    for (int i = (1); i <= (n); i++) {
      if (s.count(i)) continue;
      if (pen[i][j] < mn) {
        mn = pen[i][j];
        idx = i;
      }
    }
    ans += mn;
    s.insert(idx);
  }
  int ans1 = 0;
  set<int> s1;
  for (int i = (1); i <= (n); i++) {
    int mn = 1000000007, idx = -1;
    for (int j = (1); j <= (n); j++) {
      if (s1.count(j)) continue;
      if (pen[i][j] < mn) {
        mn = pen[i][j];
        idx = j;
      }
    }
    ans1 += mn;
    s1.insert(idx);
  }
  cout << min(ans, ans1);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(10);
  clock_t b = clock();
  int t = 1;
  for (int tt = (1); tt <= (t); tt++) solve(tt);
  clock_t e = clock();
  cerr << (double(e - b) / CLOCKS_PER_SEC) << " sec";
  return 0;
}
