#include <cstdio>
#include <algorithm>
#include <cstring>

using namespace std;

int f[11];
int a[11], b[11];

int main( void ) {
  int n, x, y, w;
  scanf( "%d %d %d", &n, &x, &y );
  for( int i = 0; i < x; ++i ) {
    scanf( "%d", &w ); --w;
    b[w] = 1;
  }
  for( int i = 0; i < y; ++i ) {
    scanf( "%d", &w ); --w;
    a[w] = 1;
  }

  int ans = n;
  for( int i = 0; i < (1<<n); ++i ) {
    for( int j = 0; j < n; ++j ) f[j] = !b[j];

    int ok = 1;
    for( int j = 0; j < n; ++j )
      if( a[j] ) {
	if( b[j] ) f[j] = 1; else
	  if( j > 0 && ( ( i>>j )&1 ) ) f[j-1] = 1; else
	    if( j+1 < n && !( ( i>>j )&1 ) ) f[j+1] = 1;
      }

    int c = n;
    for( int j = 0; j < n; ++j ) c -= f[j];
    ans = min( ans, c );
  }

  printf( "%d\n", ans );
  return 0;
}
