#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const int N = 1e5 + 5;
inline long long pow_mod(long long x, long long n) {
  long long r = 1;
  while (n) {
    if (n & 1) r = (r * x) % MOD;
    x = (x * x) % MOD;
    n >>= 1;
  }
  return r;
}
inline long long pow_(long long x, long long n) {
  long long r = 1;
  while (n) {
    if (n & 1) r = (r * x);
    x = (x * x);
    n >>= 1;
  }
  return r;
}
int F[N];
bool record[N];
inline void solve() {
  int n, k;
  cin >> n >> k;
  int cnt = 0;
  int x[k];
  for (int i = 0; i < k; i++) {
    cin >> x[i];
    F[x[i]]++;
    record[x[i]] = 1;
  }
  int tot = 3 * n - 2;
  for (int i = 0; i < k; i++) {
    if (!record[x[i]]) {
      F[x[i]]--;
      continue;
    }
    tot--, F[x[i]]--;
    if (F[x[i] + 1]) tot--;
    if (F[x[i] - 1]) tot--;
    record[x[i]] = 0;
  }
  cout << tot;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) solve();
}
