#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, n, m, i, j, x;
  cin >> a >> b >> c;
  n = a + b + c;
  long long change[3][n + 1], value[n + 1];
  for (i = 0; i <= n; i++)
    change[0][i] = change[1][i] = change[2][i] = value[i] = 0;
  for (i = 0; i < a; i++) {
    cin >> x;
    value[x] = 0;
  }
  for (i = a; i < a + b; i++) {
    cin >> x;
    value[x] = 1;
  }
  for (i = a + b; i < n; i++) {
    cin >> x;
    value[x] = 2;
  }
  for (i = 1; i <= n; i++) {
    change[0][i] = change[0][i - 1] + 1;
    change[1][i] = min(change[0][i - 1], change[1][i - 1]) + 1;
    change[2][i] =
        min(change[0][i - 1], min(change[1][i - 1], change[2][i - 1])) + 1;
    x = value[i];
    change[x][i]--;
  }
  x = min(change[0][n], min(change[1][n], change[2][n]));
  cout << x;
}
