#include <bits/stdc++.h>
#include <vector>
using namespace std;
main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    int* arr1;
    arr1 = new int[n];
    int k;
    cin >> k;
    int* arr;
    arr = new int[n - k];
    for (int i = 0; i < n; ++i)
        arr1[i] = i + 1;
    //for (int i = 0; i < n; ++i)
    //    cout << arr1[i] << " ";
    for (int i = 0; i < k; ++i){
        int l;
        cin >> l;
        arr1[l-1] = 0;
    }
    int j = 0;
    for (int i = 0; i < n; ++i){
        if(arr1[i] > 0){
            arr[j] = arr1[i];
            j++;
        }
    }
    //for (int i = 0; i < n - k; ++i)
    //{
    //    cout << arr[i] << " ";
    //}
    vector<int> ans;
    for (int i = 0; i < n - k; ++i){
        for (int j = i; j < n - k; ++j){
            int a = arr[i] + arr[j];
            ans.push_back(a);
        }
    }
    sort(ans.begin(), ans.end());
    int val = 1;
    for (int i = 1; i < ans.size(); i++)
    {
        if(ans[i] > ans[i-1])
        {
            val++;
        }
    }
    if (n == k)
        cout << 0;
    else
        cout << val;
    return 0;
}
