#include <bits/stdc++.h>
using namespace std;

const bool DEBUG = true;


const int MAX_N = 50000;
bool nums[MAX_N];
bool sums[MAX_N*2];

void dumb_solve(int n, int k){
    for(int i=1; i<=n; i++){
        nums[i] = true;
        sums[i*2] = false;
        sums[i*2+1] = false;
    }
    int x;
    for(int i=0; i<k; i++){
        cin>>x;
        nums[x] = false;
    }
    int amount = 0;
    for(int i=1; i<=n; i++){
        if(!nums[i])
            continue;
        for(int j=1; j<=n; j++){
            if(!nums[j])
                continue;
            if(sums[i+j] == false){
                sums[i+j] = true;
                amount++;
            }
        }
    }
    cout<<amount;
}

int main(){
    int n, k, x;
    map<int, bool> absent_right;
    map<int, bool> absent_left;
    cin>>n>>k;
    if(k*4+1>=n){
        dumb_solve(n, k);
        return 0;
    }
    int left_risk = k*2+1;
    int right_risk = n*2 - k*2;
    if(DEBUG)
        cout<<left_risk<<' '<<right_risk<<'\n';
    for(int i=0; i<k; i++){
        cin>>x;
        if(x>n-2*k-1)
            absent_right[x] = true;
        if(x<left_risk)
            absent_left[x] = true;
    }
    int shit = 0;
    for(int i=2; i<=left_risk; i++){
        for(int j=1; j<i; j++){
            if(!(absent_left[j] || absent_left[i - j]))
                break;
            if(j == i-1)
                shit++;
        }
    }
    for(int i=n*2; i>=right_risk; i--){
        for(int j=n; i-j<=n; j--){
            if(!(absent_right[j] || absent_right[i - j]))
                break;
            if(i-j==n)
                shit++;
        }
    }
    cout<<n*2-(shit + 1);
    return 0;
}
