#include <iostream>
#include <set>
#include <algorithm>

using namespace std;

int main()
{
    int n, k;
    cin >> n >> k;

    set<int> a;
    for (int i = 1; i <= n; i++)
        a.insert(i);

    int temp;
    for (int i = 0; i < k; i++)
    {
        cin >> temp;
        a.erase(temp);
    }

    set<int> sums;
    for (set<int>::iterator it = a.begin(); it != a.end(); it++)
    {
        for (set<int>::iterator it2 = it; it2 != a.end(); it2++)
        {
            int sum = *it + *it2;
            if (binary_search(sums.begin(), sums.end(), sum)== false)
            {
                sums.insert(sum);
            }
        }
    }

    cout << sums.size();
}
