#include <bits/stdc++.h>

using namespace std;

typedef pair<long,long> pll;
typedef set<long>::iterator si;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair

//vector <long> v;
set <long> s;
long long n,k,temp;
long firs = 1,last,it = 0;

bool check(long long t){
    long l = (t+1)/2,r = t/2;
    if (l <= firs || r > last) return 0;
    while(s.count(l)||s.count(r)){
        l--;r++;
        if (l <= firs || r > last) return 0;
    }
    return 1;
}

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >> n >> k;
    last = n;
    for (long i = 0;i < k;i++){
        cin >> temp;
        s.insert(temp);
    }
    if (n == k){
        cout << 0 ;
        return 0;
    }
    while(s.count(firs))firs++;
    while(s.count(last))last--;
    long long ans = last - firs + 1 + last - firs;
    for (si i = s.begin();i != s.end();i++){
        if (*i < firs||*i > last) continue;
        if (!check(firs + *i))ans--;
        if (!check(last + *i))ans--;
    }
    cout << ans << '\n';
    return 0;
}
