#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int arr[m];
  for (int i = 0; i < m; i++) cin >> arr[i];
  long long ans = 0;
  if (n == 1)
    ans = 1;
  else if (n == 2)
    ans = 4;
  if (n >= 2) ans = 2 + 2 * (n - 2) + n;
  bool vis[100002] = {false};
  set<pair<long long, long long> > st;
  for (long long i = 0; i < m; i++) {
    if (vis[arr[i]] == false) ans--;
    vis[arr[i]] = true;
    if (vis[arr[i] + 1] == true) {
      if (st.find({arr[i], arr[i] + 1}) == st.end()) ans--;
      st.insert({arr[i], arr[i] + 1});
    }
    if (vis[arr[i] - 1] == true) {
      if (st.find({arr[i], arr[i] - 1}) == st.end()) ans--;
      st.insert({arr[i], arr[i] - 1});
    }
  }
  cout << ans;
  return 0;
}
