#include <iostream>

using namespace std;

int main()
{
    int n,k,i,j,len;
    cin >> n >> k;
    bool f[n+1];
    for (i = 0;i < n+1;i++) f[i] = true;

    for (i = 0;i < k;i++)
    {
        int a;
        cin >> a;
        f[a] = false;
    }

    bool h[2*n+1];
    for (i = 0,len = 2*n+1;i < len;i++) h[i] = false;

    for (i = 1;i <= n;i++)
    {
        for (j = i;j <= n;j++)
        {
            if (f[i] && f[j]) h[i+j] = true;
        }
    }
    int ans = 0;
    for (i = 0,len = 2*n+1;i < len;i++) if(h[i]) ans++;
    cout << ans;

}
