#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int k[3];
  long long int n = 0;
  for (long long int i = 0; i < 3; i++) {
    cin >> k[i];
    n += k[i];
  }
  long long int pos[n + 1];
  for (long long int i = 0; i < 3; i++) {
    for (long long int j = 0; j < k[i]; j++) {
      long long int t;
      cin >> t;
      pos[t] = i;
    }
  }
  long long int dp[n + 1][3];
  memset(dp, 0, sizeof(dp));
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = 0; j < 3; j++) {
      if (pos[i] == j) {
        if (j == 0) {
          dp[i][j] = dp[i - 1][0];
        } else if (j == 1) {
          dp[i][j] = min(dp[i - 1][0], dp[i - 1][1]);
        } else if (j == 2) {
          dp[i][j] = min(dp[i - 1][2], min(dp[i - 1][1], dp[i - 1][0]));
        }
      } else {
        if (j == 0) {
          dp[i][j] = dp[i - 1][0] + 1;
        } else if (j == 1) {
          dp[i][j] = min(dp[i - 1][0], dp[i - 1][1]) + 1;
        } else if (j == 2) {
          dp[i][j] = min(dp[i - 1][2], min(dp[i - 1][1], dp[i - 1][0])) + 1;
        }
      }
    }
  }
  long long int ans = INT_MAX;
  for (long long int i = 0; i < 3; i++) ans = min(dp[n][i], ans);
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int T = 1;
  while (T--) {
    solve();
    cout << endl;
  }
  return 0;
}
