#include <bits/stdc++.h>
using namespace std;
int a[5005];
int main() {
  int i, j, n, m, len = 0, tp;
  int a, b, c;
  cin >> a >> b >> c;
  len = a + b + c + 1;
  int A[len];
  for (int i = 0; i < a; i++) {
    int x;
    cin >> x;
    A[x] = 1;
  }
  for (int i = 0; i < b; i++) {
    int x;
    cin >> x;
    A[x] = 2;
  }
  for (int i = 0; i < c; i++) {
    int x;
    cin >> x;
    A[x] = 3;
  }
  multiset<int> gg;
  for (int i = 1; i < a + b + c + 1; i++) {
    gg.insert(A[i]);
    auto it = gg.upper_bound(A[i]);
    if (it != gg.end()) gg.erase(it);
  }
  cout << a + b + c - (int)gg.size();
  return 0;
}
