#include <bits/stdc++.h>
using namespace std;
int main() {
  int x = 0;
  int y = 0;
  int n, k;
  cin >> n;
  string A[n];
  for (int i = 0; i < n; i++) {
    cin >> k;
    A[i] = k;
  }
  int m, l;
  cin >> m;
  string B[m];
  for (int i = 0; i < n; i++) {
    cin >> l;
    B[i] = l;
  }
  for (int i = 0; i < n; i++) {
    y = 0;
    for (int j = 0; j < n; j++) {
      if (A[j] == A[i]) {
        y = y + 1;
      }
    }
    for (int j = 0; j < m; j++) {
      if (B[m] == A[i]) {
        y = y - 1;
      }
    }
    if (y >= x) {
      x = y;
    }
  }
  cout << x << '\n';
  return 0;
}
