#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 7;
const long long MOD = 998244353;
long long dp[200005][3];
long long n;
long long arr[200005];
long long solve(long long idx, long long last) {
  if (idx == n + 1) {
    return 0;
  }
  if (dp[idx][last] != -1) {
    return dp[idx][last];
  }
  long long ans = INF;
  for (long long j = last; j < 3; j++) {
    ans = min(ans, solve(idx + 1, j) + (arr[idx] != j));
  }
  return dp[idx][last] = ans;
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  memset(dp, -1, sizeof dp);
  long long k[3];
  for (long long j = 0; j < 3; j++) {
    cin >> k[j];
    n += k[j];
  }
  for (long long j = 0; j < 3; j++) {
    for (long long i = 0; i < k[j]; i++) {
      long long a;
      cin >> a;
      arr[a] = j;
    }
  }
  long long ans = solve(1, 0);
  cout << ans << "\n";
}
