#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
int a[N], b[N], c[N];
int f[N];
int LIS(vector<int> v) {
  int len = 0;
  f[++len] = v[0];
  for (int i = 1; i < v.size(); i++) {
    if (v[i] > f[len]) {
      f[++len] = v[i];
    } else {
      f[lower_bound(f + 1, f + 1 + len, v[i]) - f] = v[i];
    }
  }
  return len;
}
int main() {
  int n, m, t;
  cin >> n >> m >> t;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
  }
  for (int i = 1; i <= t; i++) {
    cin >> c[i];
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m);
  sort(c + 1, c + 1 + t);
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    v.push_back(a[i]);
  }
  for (int i = 1; i <= m; i++) {
    v.push_back(b[i]);
  }
  for (int i = 1; i <= t; i++) {
    v.push_back(c[i]);
  }
  cout << (n + m + t) - LIS(v) << '\n';
}
