#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    long long n, k, arr[34239]={0}, mas[32469]={1}, a, c = 0;
    cin >> n >> k;
    for (int i = 1; i <= k; i++)
    {
            cin >> a;
            mas[a]--;
    }
    for (int i = 1; i <= n; i++)
    {
             for (int j = i; j <= n; j++)
                 if (arr[i+j] == 0 and mas[i] == 0 and mas[j] == 0)
                 {
                   arr[i+j]++;
                   c++;
                   }
    }
    cout << c;
    return 0;
}
