#include <bits/stdc++.h>
using namespace std;
vector<int> ques;
vector<pair<int, int> > v;
map<pair<int, int>, bool> mp;
bool mark[100005];
int main() {
  int n, k, i, j, x, ans = 0, y;
  cin >> n >> k;
  for (i = 0; i < k; i++) {
    cin >> x;
    ques.push_back(x);
  }
  for (i = 1; i <= n; i++) {
    if (i > 1) v.push_back(make_pair(i, i - 1));
    if (i < n) v.push_back(make_pair(i, i + 1));
    v.push_back(make_pair(i, i));
  }
  sort(v.begin(), v.end());
  unique(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) {
    mp[v[i]] = true;
  }
  for (i = k - 1; i >= 0; i--) {
    x = ques[i];
    mp[make_pair(x, x)] = false;
    if (x > 1) {
      y = x - 1;
      if (mark[y]) {
        mp[make_pair(x, y)] = false;
      }
    }
    if (x < n) {
      y = x + 1;
      if (mark[y]) {
        mp[make_pair(x, y)] = false;
      }
    }
    mark[x] = true;
  }
  for (i = 0; i < v.size(); i++) {
    if (mp[v[i]]) {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
