#include <bits/stdc++.h>
using namespace std;
void solve(int tc) {
  long long n = 0, m = 0, i = 0, j = 0, l = 0, r = 0, x = 0, y = 0, q = 0,
            z = 0, len = 0, k = 0, p = 0;
  long long a[200005] = {0}, b[200005] = {0}, c[200005] = {0}, d[200005] = {0};
  string s, t;
  cin >> n >> k;
  vector<vector<long long>> v(n + 5);
  for (i = 0; i < k; i++) {
    cin >> a[i];
    v[a[i]].push_back(i);
  }
  long long ans = 0;
  for (long long pos = 1; pos <= n; pos++) {
    if (v[pos].size()) {
      if ((pos - 1) > 0) {
        long long ind =
            upper_bound(v[pos - 1].begin(), v[pos - 1].end(), v[pos][0]) -
            v[pos - 1].begin();
        if (ind == v[pos - 1].size()) {
          ans++;
        }
      }
      if ((pos + 1) <= n) {
        long long ind =
            upper_bound(v[pos + 1].begin(), v[pos + 1].end(), v[pos][0]) -
            v[pos + 1].begin();
        if (ind == v[pos + 1].size()) {
          ans++;
        }
      }
    } else {
      if (pos == 1 || pos == n) {
        ans += 2;
      } else {
        ans += 3;
      }
    }
  }
  cout << ans;
}
bool imp = false;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  if (imp) cin >> t;
  int m = t;
  while (t--) {
    solve(m - t);
  }
  return 0;
}
