#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<vector<int> > a(n, vector<int>(3, 1));
  a[0][0] = 0, a[n - 1][2] = 0;
  unordered_set<int> b;
  int t;
  for (int i = 0; i < k; ++i) {
    cin >> t;
    a[t - 1][1] = 0;
    if (t > 1 && b.count(t - 1) == 1) a[t - 2][2] = 0;
    if (t < n && b.count(t + 1) == 1) a[t][0] = 0;
    b.insert(t);
  }
  int ret = 0;
  for (int i = 0; i < n; ++i) ret += a[i][0] + a[i][1] + a[i][2];
  cout << ret << endl;
  return 0;
}
