#include <bits/stdc++.h>

#define int long long
#define pb push_back

using namespace std;

typedef pair<int, int> pp;

int n, k, ans = 0, x;
map<int, int> m;

int f(int x) {
    int a = x / 2;
    int b = (x + 1) / 2;
    while(a >= 1 && b <= n) {
        if(!m[a] && !m[b]){
            return 1;
        }
        --a;
        ++b;
    }
    return 0;
}

main()
{
    ios::sync_with_stdio(0);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
    cin >> n >> k;
    for(int i = 0; i < k; ++i) {
        cin >> x;
        m[x] = 1;
    }
    int amin = 1 + k, amax = n - k;
    amin = 2 * amin;
    amax = 2 * amax;
//    cout << amin << " " << amax << endl;
    if(amin <= amax){
        ans = amax - amin + 1;
        for(int i = 2; i < amin; ++i) {
//            cout << i << " " << f(i) << endl;
            if(f(i)) ++ans;
        }
        for(int i = amax + 1; i <= 2 * n; ++i) {
//            cout << i << " " << f(i) << endl;
            if(f(i)) ++ans;
        }
    }
    else{
        for(int i = 2; i <= 2 * n; ++i) {
//            cout << i << " " << f(i) << endl;
            if(f(i)) ++ans;
        }
    }
    cout << ans;

    return 0;
}
