#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;

const int K = 1e5+3;

int n, k;
int a[K];
bool used[2*K], is[K];
map<long long, bool> m;
int main()
{
    cin >> n >> k;
    for (int i = 1; i <= k; i++)
        cin >> a[i];
    if (n <= 4000) {
    for (int i = 1; i <= k; i++)
        is[a[i]] = 1;
    for (int i = 1; i <= n; i++)
        for (int j = i; j <= n; j++)
            if (!is[i] && !is[j])
                used[i+j] = 1;
    int kol = 0;
    for (int i = 1; i <= n+n; i++)
        if (used[i] == 1)
            kol++;
    cout << kol;
    return 0;
    }

    for (int i = 1; i <= k; i++)
        m[a[i]] = 1;
    ll kol = 2*n - 1;
    for (ll x = 2; x <= 3000; x++)
    {
        bool r = 0;
        for (ll i = 1; i <= x-1; i++)
            if (x-i > 0 && i <= n && !m[i] && !m[x-i])
                r = 1;
        if (!r)
            kol--;
    }
    for (ll x = 2*n; x >= 2*n-3000; x--)
    if ( x >0 )
    {
        bool r = 0;
        for (ll i = n; x-i <= n; i--)
            if (-i > 0 && i > 0 && !m[i] && !m[x-i])
                r = 1;
        if (r  == 0)
            kol--;
    }
    cout << kol;
    return 0;
}
