#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j, k, p, a[100005], color[100005], nerk[100005], x, ans, t,
    y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (i = 1; i <= k; i++) {
    cin >> a[i];
    color[a[i]]++;
  }
  nerk[a[1]] = 1;
  for (i = 2; i <= k; i++) {
    if (nerk[a[i]] == 0) {
      nerk[a[i]]++;
      if (nerk[a[i] - 1] == color[a[i] - 1] && a[i] != 1) ans++;
      if (a[i] != n && nerk[a[i] + 1] == color[a[i] + 1]) ans++;
    } else
      nerk[a[i]]++;
  }
  if (color[a[1] - 1] == 0 && a[1] != 1) ans++;
  if (color[a[1] + 1] == 0 && a[1] != n) ans++;
  for (i = 1; i <= n; i++) {
    if (color[i] == 0) {
      if (i != 1 && i != n)
        ans += 3;
      else
        ans += 2;
    }
  }
  cout << ans << endl;
  return 0;
}
