#include <iostream>
#include <set>

using namespace std;

int main()
{
    cin.tie(NULL);
    cout.tie(NULL);
    ios_base::sync_with_stdio(0);

    int N, K, x;
    cin >> N >> K;
    set <int> S;
    S.clear();
    for (int i = 0; i < K; ++i){
        cin >> x;
        S.insert(x);
    }

    int m, answ = 0;
    for (int t = 2; t <= 2*N; ++t){
        for (m = 1; m <= t/2; ++m){
            if ( (!S.count(m)) && (!S.count(t-m)) && (t-m <= N) ){
                ++answ;
                m = t+10;
            }
        }
    }

    cout << answ;
    return 0;
}
