#include <bits/stdc++.h>
using namespace std;
constexpr int MOD = 1e9 + 7;
constexpr int MAXN = 2e6 + 10;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
ll N, M, K, T;
ll A[MAXN];
int first[MAXN], last[MAXN];
ll Solution() {
  memset(first, -1, sizeof(first));
  memset(last, -1, sizeof(last));
  for (int i = (int)(0); i < (int)(K); ++i) {
    last[A[i]] = i;
  }
  for (int i = (int)(K - 1); i >= (int)(0); --i) {
    first[A[i]] = i;
  }
  ll ans = 0;
  for (int i = (int)(1); i < (int)(N + 1); ++i) {
    for (int j = (int)(-1); j < (int)(2); ++j) {
      int a = i, b = i + j;
      if (b >= 1 && b <= N) {
        if (first[a] == -1 || last[b] == -1 || last[b] < first[a]) {
          ++ans;
        }
      }
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  while (cin >> N >> K) {
    for (int i = (int)(0); i < (int)(K); ++i) cin >> A[i];
    cout << Solution() << '\n';
  }
  return 0;
}
