#include <bits/stdc++.h>
using namespace std;
long long n, k, ans, p, f[200000], indp[200000], inds[200000], a[200000], w;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    if (f[a[i]] == 0) {
      f[a[i]] = 1;
      p++;
    }
  }
  ans += n - p;
  for (int i = 1; i <= k; i++)
    if (indp[a[i]] == 0) indp[a[i]] = i;
  for (int i = k; i >= 1; i--)
    if (inds[a[i]] == 0) inds[a[i]] = i;
  for (int i = 1; i <= n; i++) {
    if (i == 1 && n > 1) {
      if (indp[1] == 0 || indp[2] == 0 || inds[2] < indp[1]) {
        ans++;
      }
    }
    if (i == n && n > 1) {
      if (indp[n - 1] == 0 || indp[n] == 0 || inds[n - 1] < indp[n]) {
        ans++;
      }
    }
    if (i != n && i != 1) {
      if (indp[i - 1] == 0 || indp[i] == 0 || inds[i - 1] < indp[i]) {
        ans++;
      }
      if (indp[i] == 0 || indp[i + 1] == 0 || inds[i + 1] < indp[i]) {
        ans++;
      }
    }
  }
  cout << ans;
}
