#include <bits/stdc++.h>
using namespace std;
int main() {
  int n[3], np = 0;
  for (int i = 0; i < 3; i++) {
    scanf("%d", &n[i]);
    np += n[i];
  }
  int dis[np];
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n[i]; j++) {
      int tmp;
      scanf("%d", &tmp);
      dis[tmp - 1] = i;
    }
  }
  int ans[3] = {0};
  for (int i = 0; i < np; i++) {
    for (int j = 2; j >= 0; j--) {
      for (int k = j - 1; k >= 0; k--)
        if (ans[j] > ans[k]) ans[j] = ans[k];
      if (dis[i] != j) ans[j]++;
    }
  }
  int m = ans[0];
  for (int i = 1; i < 3; i++)
    if (m > ans[i]) m = ans[i];
  printf("%d\n", m);
  return 0;
}
