#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int a[m];
  map<int, vector<int> > hash;
  for (int i = 0; i < m; i++) cin >> a[i], hash[a[i]].push_back(i);
  int ans = 3 * n - 2 - hash.size();
  for (auto x : hash) {
    if (hash.find(x.first - 1) != hash.end() &&
        !(x.second[x.second.size() - 1] < hash[x.first - 1][0]))
      ans--;
    if (hash.find(x.first + 1) != hash.end() &&
        !(x.second[x.second.size() - 1] < hash[x.first + 1][0]))
      ans--;
  }
  cout << ans;
}
