#include <iostream>
#include <vector>

bool CanMakeThisHeight(long long checkHeight, std::vector<long long> arr) {
    for (long long i = 0; i < checkHeight; ++i) {
        long long Num2 = i;
        long long Num1 = checkHeight - i;

        bool FoundNum1 = false, FoundNum2 = false;
        for (int i = 0; i < arr.size(); ++i) {
            if (Num1 == arr[i]) FoundNum1 = true;
            if (Num2 == arr[i]) FoundNum2 = true;
        }

        if (FoundNum1 && FoundNum2) return true;
    }

    return false;
}

int main()
{
    long long N, K;
    std::cin >> N >> K;
    std::vector<long long> CantCome; CantCome.resize(K);
    for (long long i = 0; i < K; ++i)
        std::cin >> CantCome[i];

    std::vector<long long> Comed;
    int maxThing = 0;

    for (int i = 1; i <= N; ++i) {
        bool IsWrite = true;

        for (int j = 0; j < K; ++j) {
            if (i == CantCome[j])
                IsWrite = false;
        }

        if (IsWrite) {
            Comed.push_back(i);
            maxThing = std::max(maxThing, i);
        }
    }

    long long result = 0;

    for (long long i = maxThing*2; i >= 1; --i) {
        if(CanMakeThisHeight(i, Comed))
            ++result;
    }

    std::cout << result;
    return 0;
}
