#include <cstdio>
#include <algorithm>

using namespace std;

const int MaxN = 15;

int kol [ MaxN ];

int n,s,r;

int main ( ) {
    scanf("%d%d%d",&n,&s,&r);

    int x;

    for ( int i = 0; i < s ; i++) {
        scanf("%d",&x);
        kol[x]--;
    }

    for ( int i = 0 ; i < r ; i++) {
        scanf("%d",&x);
        kol[x]++;
    }

    for ( int i = 0 ; i <= n ; i++) {
        if ( i > 0 && kol [i - 1] == -1 && kol [i] == 1 ) {
            kol [i - 1] = 0;
            kol [i] = 0;
        }
        if ( kol [i + 1] == -1 && kol [i] == 1 ) {
            kol [i+1] = 0;
            kol [i] = 0;
        }
    }

    int sol = 0;
    for ( int i = 0 ; i <= n ; i++)
        sol += kol[i] == -1;

    printf("%d\n",sol);
    return 0;
}
