#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
map<int, int> fo;
int da[maxn], cnt[maxn];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> da[i];
  }
  int res = 3 * n - 2;
  memset(cnt, 0, sizeof(cnt));
  for (int i = m - 1; i >= 0; i--) {
    fo[da[i]] = i;
    cnt[da[i]]++;
  }
  for (int i = 0; i < m; i++) {
    if (fo[da[i]] == i) {
      if (cnt[da[i]]) res--;
      if (cnt[da[i] + 1]) res--;
      if (cnt[da[i] - 1]) res--;
    }
    cnt[da[i]]--;
  }
  cout << res << endl;
  return 0;
}
