#include <bits/stdc++.h>
using namespace std;
set<int> st;
vector<int> v, v1, v2;
map<int, int> low, high;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  cin >> n >> q;
  long long int x = (n - 1) * 2 + n;
  for (int i = 0; i < q; i++) {
    int a;
    cin >> a;
    st.insert(a);
    v.push_back(a);
  }
  for (int i = 0; i < q; i++) {
    if (low[v[i]] == 0) {
      low[v[i]] = i;
      low[v[i]]++;
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    if (high[v[i]] == 0) {
      high[v[i]] = i;
      high[v[i]]++;
    }
  }
  int ok = 0;
  for (int i = 1; i <= n; i++) {
    if (low[i + 1] != 0 && high[i] != 0) {
      if (low[i + 1] < high[i]) {
        ok++;
      }
    }
    if (low[i] != 0 && high[i + 1] != 0) {
      if ((high[i + 1] > low[i])) {
        ok++;
      }
    }
  }
  x -= (st.size() + ok);
  cout << x << endl;
  return 0;
}
