#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
int arr[N];
int dp[N][4];
int n;
void init() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 3; j++) {
      dp[i][j] = N;
    }
  }
}
int solve() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 3; j++) {
      if (arr[i] == j)
        for (int k = 1; k <= j; k++) {
          dp[i][j] = min(dp[i][j], dp[i - 1][k]);
        }
      else {
        for (int k = 1; k <= j; k++) {
          dp[i][j] = min(dp[i][j], dp[i - 1][k] + 1);
        }
      }
    }
  }
  int MIN = min(min(dp[n][1], dp[n][2]), dp[n][3]);
  return MIN;
}
int main() {
  int k1, k2, k3, a;
  scanf("%d%d%d", &k1, &k2, &k3);
  n = k1 + k2 + k3;
  init();
  for (int i = 0; i < k1; i++) {
    scanf("%d", &a);
    arr[a] = 1;
  }
  for (int i = 0; i < k2; i++) {
    scanf("%d", &a);
    arr[a] = 2;
  }
  for (int i = 0; i < k3; i++) {
    scanf("%d", &a);
    arr[a] = 3;
  }
  cout << solve() << endl;
  return 0;
}
