#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;


int main()
{
	cin.tie(0);
	ios::ios_base::sync_with_stdio(false);

	int n, q;
	cin >> n;
	vector<int>S(n);
	for (int i = 0; i < n; ++i)cin >> S[i];
	sort(S.begin(), S.end());
	cin >> q;
	vector<int>T(q);
	for (int i = 0; i < q; ++i)cin >> T[i];
	sort(T.begin(), T.end());
	int ans = 0;
	for (int i = 0; i < q; ++i) {
		if(binary_search(S.begin(), S.end(), T[i]))++ans;
	}cout << ans << endl;
}
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define REP(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
string char_to_string(char val) {
  return string(1, val);
}
int char_to_int(char val) {
  return val - '0';
}

int main() {
  int N; cin >> N;
  string A, B, C; cin >> A >> B >> C;

  int cnt = 0;
  REP(i, N) {
    if(A[i] == B[i] && B[i] == C[i]) {
      
    }
    else if(A[i] == B[i]) {
      cnt++;
    }
    else if(A[i] == C[i]) {
      cnt++;
    }
    else if(C[i] == B[i]) {
      cnt++;
    } else {
      cnt = cnt + 2;
    }
  }

  cout << cnt << endl;
}