#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
using ld = long double;
const ll mod = 1000000007;
const ll INF = 1000000099;
const ll LINF = (ll)(1e18 + 99);
vector<ll> dx = {-1, 1, 0, 0}, dy = {0, 0, -1, 1};
template <typename T, typename U>
void chmin(T& t, const U& u) {
  if (t > u) t = u;
}
template <typename T, typename U>
void chmax(T& t, const U& u) {
  if (t < u) t = u;
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T mpow(T a, T n) {
  T res = 1;
  for (; n; n >>= 1) {
    if (n & 1) res = res * a;
    a = a * a;
  }
  return res;
}
template <typename T>
vector<T> LIS(vector<T>& a) {
  int N = a.size();
  vector<T> mnlast(N, INF);
  for (int i = 0; i < N; i++) {
    auto itr = upper_bound(mnlast.begin(), mnlast.end(), a[i]);
    if (itr != mnlast.end()) *itr = a[i];
  }
  return mnlast;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c;
  cin >> a >> b >> c;
  vector<int> va(a), vb(b), vc(c);
  vector<int> v(0);
  for (ll i = 0; i < (ll)(a); i++) cin >> va[i];
  for (ll i = 0; i < (ll)(b); i++) cin >> vb[i];
  for (ll i = 0; i < (ll)(c); i++) cin >> vc[i];
  sort((va).begin(), (va).end());
  sort((vb).begin(), (vb).end());
  sort((vc).begin(), (vc).end());
  for (ll i = 0; i < (ll)(a); i++) v.push_back(va[i]);
  for (ll i = 0; i < (ll)(b); i++) v.push_back(vb[i]);
  for (ll i = 0; i < (ll)(c); i++) v.push_back(vc[i]);
  vector<int> u = LIS(v);
  cout << a + b + c - (lower_bound((u).begin(), (u).end(), INF) - u.begin())
       << endl;
}
