#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int mid[N], p[N];
int main(void) {
  int n[3] = {0};
  scanf("%d %d %d", n, n + 1, n + 2);
  for (int j = 0; j < 3; j++) {
    for (int i = 0; i < n[j]; i++) {
      int x;
      scanf("%d", &x);
      p[x] = j;
    }
  }
  int m = n[0] + n[1] + n[2];
  int ans = min({n[1] + n[2], n[0] + n[2], n[0] + n[1]});
  {
    int last = n[0] + n[2];
    for (int i = 1; i <= m; i++) {
      int curr = last;
      if (p[i] == 1)
        curr++;
      else if (p[i] == 0)
        curr--;
      ans = min(ans, curr);
      last = curr;
    }
  }
  {
    int last = n[0] + n[1];
    for (int i = 1; i <= m; i++) {
      int curr = last;
      if (p[i] == 2)
        curr++;
      else if (p[i] == 0)
        curr--;
      ans = min(ans, curr);
      last = curr;
    }
  }
  multiset<int> ms;
  int last = n[1] + n[0];
  for (int i = 1; i <= m; i++) {
    mid[i] = last;
    if (p[i] == 1) {
      mid[i]--;
    } else if (p[i] == 2) {
      mid[i]++;
    }
    last = mid[i];
    ms.insert(mid[i]);
    ans = min(ans, last);
  }
  int cnt[3] = {0};
  for (int i = 1; i < m; i++) {
    cnt[p[i]]++;
    ms.erase(ms.find(mid[i]));
    int lul = *(ms.begin());
    ans = min(ans, lul - cnt[0] + cnt[1]);
  }
  cout << ans << endl;
  return 0;
}
