#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i, x, r, j, k, ans = 0, c = 0, error = 0;
  cin >> n >> k;
  long long a[n + 1];
  long long b[n + 1][2];
  for (i = 0; i <= n; i++) {
    b[i][0] = 0;
    b[i][1] = 0;
    a[i] = 0;
  }
  ans = (n - 2) * 3 + 4;
  for (i = 0; i < k; i++) {
    cin >> x;
    if (a[x] == 0) ans--;
    if (b[x][0] == 0 && a[x - 1] == 1) {
      ans--;
      b[x][0] = 1;
    }
    if (b[x][1] == 0 && a[x + 1] == 1) {
      ans--;
      b[x][1] = 1;
    }
    a[x] = 1;
  }
  cout << ans;
  return 0;
}
