#include <bits/stdc++.h>
const int MAXN = 2e5 + 5;
using namespace std;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % 1000000007;
    }
    x = (x * x) % 1000000007;
    y = y >> 1;
  }
  return res;
}
std::vector<long long int> divi[1000004];
void divisor(int n) {
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = i; j <= n; j += i) {
      divi[j].push_back(i);
    }
  }
}
long long int a[100005];
long long int f[100005];
long long int vis[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, h, k;
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    f[a[i]]++;
  }
  long long int ans = 3 * n - 2;
  for (int i = 1; i <= k; i++) {
    if (vis[a[i]] == 1) {
      f[a[i]]--;
      continue;
    }
    ans--;
    if (f[a[i] + 1] != 0) {
      ans--;
    }
    if (f[a[i] - 1] != 0) {
      ans--;
    }
    f[a[i]]--;
    vis[a[i]] = 1;
  }
  cout << ans << endl;
  return 0;
}
