#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n, x, y, z, s, ans = 0;
  ll a[101], b[101], c[101];
  rep(i, 101) a[i] = b[i] = c[i] = 0;
  cin >> n;
  cin >> x;
  rep(i, x) {
    cin >> s;
    a[s]++;
  }
  cin >> y;
  rep(i, y) {
    cin >> s;
    b[s]++;
  }
  cin >> z;
  rep(i, z) {
    cin >> s;
    c[s]++;
  }
  rep(i, 101) {
    if((!a[i] && c[i]) || (b[i]) && c[i]) ans++;
  }
  cout << ans << endl;
	return 0;
}
