#include <bits/stdc++.h>
using namespace std;
mt19937_64 gen;
const int N = 2e5 + 15;
int a[N];
int dp[3][N];
void run() {
  int n[3];
  cin >> n[0] >> n[1] >> n[2];
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n[i]; j++) {
      int first;
      cin >> first;
      a[first] = i;
    }
  }
  for (int i = 0; i < 3; i++) fill(dp[i] + 1, dp[i] + N, 1e9);
  int m = n[0] + n[1] + n[2];
  for (int i = 1; i <= m; i++) {
    for (int j = 0; j < 3; j++) {
      for (int k = 0; k <= j; k++) {
        dp[j][i] = min(dp[j][i], dp[k][i - 1] + (a[i] != j));
      }
    }
  }
  cout << min(dp[0][m], min(dp[1][m], dp[2][m]));
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(16);
  run();
}
