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

int main()
{
    long long n, m, i,j, k, s = 0;

    cin >> n;
    cin >> m;

    vector <long long> m1 (n);
    fill (m1.begin(),m1.end(),1);

    vector <long long> mas (m);

    for (i = 0; i < m; i++){
     cin  >> mas[i];
     m1[mas[i]-1] = 0;
    }

    for (i = n-1; i >= 0; i--){
        if (m1[i] == 1){
            break;
        }
    }

    k = 2*(i+1) - 1;

    vector <long long> m2 (k);
    fill (m2.begin(),m2.end(),0);

    for (i = 0;i < n; i++){
        for (j = 0;j < n; j++){
            if (m1[i] == 1 && m1[j] == 1){
            m2[j+i] = 1;
            }
        }
    }
    for (i = 0; i < k; i++){

        s = s+m2[i];

    }
    cout << s << endl;


    return 0;
}
