#include <bits/stdc++.h>
using namespace std;
int a[100005];
vector<int> res[100005];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    res[a[i]].push_back(i);
  }
  int ans = n * 3 - 2;
  for (int i = 1; i < n; i++) {
    if (res[i].size() != 0) ans--;
    int flag = 0;
    for (int x : res[i]) {
      for (int y : res[i + 1]) {
        if (x > y) {
          ans--;
          flag = 1;
          break;
        }
      }
      if (flag == 1) break;
    }
  }
  if (res[n].size() != 0) ans--;
  for (int i = n; i > 1; i--) {
    int flag = 0;
    for (int x : res[i]) {
      for (int y : res[i - 1]) {
        if (x > y) {
          ans--;
          flag = 1;
          break;
        }
      }
      if (flag) break;
    }
  }
  cout << ans << endl;
  return 0;
}
