#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> questions(k);
  vector<int> previsited(n + 1, 0);
  vector<int> posvisited(n + 1, 0);
  vector<int> vis;
  int tot_non = n;
  for (int i = 0; i < k; i++) {
    cin >> questions[i];
    if (!previsited[questions[i]]) {
      tot_non--;
      vis.push_back(questions[i]);
      previsited[questions[i]] = i + 1;
    }
    posvisited[questions[i]] = i + 1;
  }
  int ans = tot_non * 3;
  if (previsited[1] == 0) ans--;
  if (previsited[n] == 0) ans--;
  for (int i = 0; i < vis.size(); i++) {
    if (vis[i] <= n - 1 && previsited[vis[i]] > posvisited[vis[i] + 1]) {
      ans++;
    }
    if (vis[i] >= 2 && previsited[vis[i]] > posvisited[vis[i] - 1]) {
      ans++;
    }
  }
  cout << ans << endl;
}
