#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(10);
  cout << fixed;
  int n, k;
  cin >> n >> k;
  int a[k];
  for (int i = 0; i < k; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << 0;
    return (0);
  }
  int v[n + 1];
  v[1] = 2;
  for (int i = 2; i < n; i++) {
    v[i] = 3;
  }
  v[n] = 2;
  map<int, int> p;
  for (int i = k - 1; i >= 0; i--) {
    if (p.find(a[i]) == p.end()) {
      v[a[i]]--;
      p[a[i]] = 1;
    }
    if (a[i] == 1) {
      if (p.find(2) != p.end()) {
        v[1] = 0;
      }
    } else if (a[i] == n) {
      if (p.find(n - 1) != p.end()) {
        v[n] = 0;
      }
    } else {
      int num = 2;
      if (p.find(a[i] - 1) != p.end()) {
        num--;
      }
      if (p.find(a[i] + 1) != p.end()) {
        num--;
      }
      v[a[i]] = min(v[a[i]], num);
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += v[i];
  }
  cout << ans;
}
