#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long N = 300005, M = N;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 1) return (power(a, b - 1) * a) % 1000000007;
  long long q = power(a, b / 2);
  return (q * q) % 1000000007;
}
void solve() {
  long long n, m;
  cin >> n >> m;
  long long ans = (long long)n * (long long)(n + 1) / 2LL;
  long long z = n - m;
  long long k = z / (m + 1);
  ans = ans - (long long)(m + 1) * (long long)k * (long long)(k + 1) / 2LL -
        (long long)(z % (m + 1)) * (long long)(k + 1);
  printf("%lld\n", ans);
}
long long f[200005][3], pos[200005];
int32_t main() {
  long long n, m, k, t;
  cin >> n >> m >> k;
  long long total = n + m + k;
  for (long long i = 0; i < n; ++i) {
    cin >> t;
    pos[t] = 0;
  }
  for (long long i = 0; i < m; ++i) {
    cin >> t;
    pos[t] = 1;
  }
  for (long long i = 0; i < k; ++i) {
    cin >> t;
    pos[t] = 2;
  }
  f[0][2] = f[0][1] = f[0][0] = 0;
  for (long long i = 1; i <= total; ++i) {
    for (long long j = 0; j < 3; ++j) {
      if (pos[i] == j) {
        if (j == 0) {
          f[i][0] = f[i - 1][0];
        } else if (j == 1) {
          f[i][j] = min(f[i - 1][0], f[i - 1][1]);
        } else if (j == 2) {
          f[i][j] = min(f[i - 1][2], min(f[i - 1][0], f[i - 1][1]));
        }
      } else {
        if (j == 0) {
          f[i][j] = f[i - 1][0] + 1;
        } else if (j == 1) {
          f[i][j] = min(f[i - 1][0], f[i - 1][1]) + 1;
        } else if (j == 2) {
          f[i][j] = min(f[i - 1][2], min(f[i - 1][0], f[i - 1][1])) + 1;
        }
      }
    }
  }
  long long ans = 200020;
  for (long long i = 0; i < 3; i++) ans = min(f[total][i], ans);
  cout << ans;
  return 0;
}
