#include <bits/stdc++.h>
using namespace std;
long long powm(long long a, long long b, long long mod) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long tmp = powm(a, b / 2, mod);
    return (tmp * tmp) % mod;
  } else
    return (a % mod * powm(a, b - 1, mod)) % mod;
}
long long invm(long long a, long long mod) { return powm(a, mod - 2, mod); }
void solve() {
  int n, k, tmp, ret = 0;
  cin >> n >> k;
  vector<int> a[n + 2];
  for (int i = 0; i < k; i++) {
    cin >> tmp;
    a[tmp].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = max(1, i - 1); j <= min(i + 1, n); j++) {
      if (a[i].size() == 0 || a[j].size() == 0)
        ret++;
      else {
        if (a[i].front() > a[j].back()) ret++;
      }
    }
  }
  cout << ret << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(12);
  long long t = 1, tc = 1;
  while (t--) {
    solve();
  }
  return 0;
}
