#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void _read(T& x) {
  cin >> x;
}
void R() {}
template <typename T, typename... U>
void R(T& head, U&... tail) {
  _read(head);
  R(tail...);
}
template <typename T>
inline void _write(const T& x) {
  cout << x << ' ';
}
void W() { cout << endl; }
template <typename T, typename... U>
void W(const T& head, const U&... tail) {
  _write(head);
  W(tail...);
}
void go();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  go();
  return 0;
}
const int MAXN = 1e5 + 10;
int cnt[MAXN];
int mi[MAXN], mx[MAXN];
void go() {
  int n, k;
  R(n, k);
  for (int i = 1; i <= k; i++) {
    int x;
    R(x);
    cnt[x]++;
    if (mi[x] == 0) {
      mi[x] = i;
      mx[x] = i;
    } else {
      mi[x] = min(mi[x], i);
      mx[x] = max(mx[x], i);
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (cnt[i] == 0) {
      ans++;
      if (i != 1) ans++;
      if (i != n) ans++;
    } else {
      int val;
      if (i != 1) {
        val = i - 1;
        if (cnt[val] == 0) {
          ans++;
        } else if (mx[val] < mi[i]) {
          ans++;
        }
      }
      if (i != n) {
        val = i + 1;
        if (cnt[val] == 0) {
          ans++;
        } else if (mx[val] < mi[i]) {
          ans++;
        }
      }
    }
  }
  W(ans);
}
