#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <set>

#define ll long long

using namespace std;

int main()
{
    ios :: sync_with_stdio( false );
    cin.tie( 0 );

    ll n, k;
    cin >> n >> k;
    ll l[ k ], a[ n - k + 1 ];
    for( ll i = 0 ; i < k ; i++ )
    {
        cin >> l[ i ];
    }

    sort( l, l + k );
    ll h = 0, j = 1;
    for( ll i = 1 ; i <= n; i++ )
    {
        if( i == l[ h ] )
        {
            h++;
            continue;
        }
        a[ j ] = i;
        j++;
    }

    set < ll >qw;
    ll p = 0;
    for( ll i = 1 ; i <= n - k ; i++ )
    {
        for( ll j = i ; j <= n - k ; j++ )
        {
            if( qw.find( a[ i ] + a[ j ] ) == qw.end() )
            {
                qw.insert( a[ i ] + a[ j ] );
                p++;
            }
        }
    }

    /*for( ll i = 0 ; i < k ; i++ )
    {
        cout << l[ i ] << " ";
    }
    cout << endl;
    for( ll i = 1 ; i < ( n - k + 1 ) ; i++ )
    {
        cout << a[ i ] << " ";
    }*/

    cout << p;

    return 0;
}
