#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:5000000000")
const int Inf = 2e9;
long long LINF = (long long)4e18;
using namespace std;
long long mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  if (n == 1) {
    cout << 0;
    return 0;
  }
  vector<int> kol(n + 2, -1), tme(n + 2, Inf);
  for (int i = 0; i < k; i++) {
    int q;
    cin >> q;
    kol[q] = i;
    tme[q] = min(tme[q], i);
  }
  long long ans = 0;
  for (int i = 2; i < n; i++) {
    if (kol[i] == -1) {
      ans += 3;
      continue;
    }
    if (kol[i + 1] < tme[i]) ans++;
    if (kol[i - 1] < tme[i]) ans++;
  }
  if (kol[n] == -1) {
    ans += 2;
  } else {
    if (kol[n - 1] < tme[n]) ans++;
  }
  if (kol[1] == -1) {
    ans += 2;
  } else {
    if (kol[2] < tme[1]) ans++;
  }
  cout << ans;
  return 0;
}
