#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define int lint
#define all(x) x.begin(), x.end()
#define die(x) { cout << (x); return 0; }

using namespace std;
typedef long long lint;
typedef pair<int, int> pii;
const int inf = 1000*1000*1000 + 7;

vector<bool> s;
vector<int> a, b;

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

    int n, k;
    cin >> n >> k;
    a.resize(k);
    s.assign(2*n+1, 0);
    for (int i = 0; i < k; i++)
        cin >> a[i];
    sort(all(a));
    for (int j = 0, i = 1; i <= n; i++)
        if (j >= k || i != a[j]) b.push_back(i);
        else j++;
    for (int i = 0; i < n-k; i++)
        for (int j = 0; j < n-k; j++)
            s[b[i]+b[j]] = 1;
    int ans = 0;
    for (int i = 2; i <= 2*n; i++)
        ans += s[i];
    cout << ans;

    return 0;
}
