#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n, k;
  cin >> n >> k;
  map<ll, ll> m;
  set<pair<ll, ll>> v;
  ll x;
  for (int i = 0; i < k; i++) {
    cin >> x;
    m[x]++;
    if (m[x - 1]) v.insert({x - 1, x});
    if (m[x + 1]) v.insert({x + 1, x});
    v.insert({x, x});
  }
  cout << 3 * n - 2 - v.size();
}
