#include <iostream>
#include <set>

using namespace std;

typedef long long ll;
typedef long double ld;


#define fan(i,a,n) for(ll i=a;i<n;i++)
#define fna(i,a,n) for(ll i=n;i>=0;i--)
#define fit(it,x) for(set<ll>::iterator it=x.begin();it!=x.end();it++)
#define mp make_pair
#define pb push_back


int main(){
    ios_base::sync_with_stdio(0);
    ll n,k;
    set<ll> g;
    cin >> n >> k;
    ll arr[n+1];
    fan(i,1,n+1)arr[i]=i;
    fan(i,0,k){
        ll temp;
        cin >> temp;
        arr[temp]=0;
    }
    fan(i,1,n+1){if(arr[i]!=0) fan(j,1,n+1){
        if(arr[j]!=0)g.insert(arr[i]+arr[j]);
    }}

    cout << g.size();


    return 0;
}
