#include <iostream>
#include <cstdio>
#include <string>
#include <string.h>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <set>
using namespace std;

int main()
{
  int n,k;
  cin>>n>>k;
  vector<int>absent;
  for(int i=0;i<k;i++)
  {
      int a;
      cin>>a;
      absent.push_back(a);
  }
  vector<int>arr;
  for(int i=1;i<=n;i++)
  {
      if(find(absent.begin(),absent.end(),i)==absent.end())
      {
            arr.push_back(i);
      }
  }
  set<long long>sums;
  for(int i=0;i<arr.size();i++)
  {
      for(int j=i;j<arr.size();j++)
      {
            sums.insert(arr[i]+arr[j]);
      }
  }
  cout<<sums.size()<<endl;
    return 0;
}
