#include <bits/stdc++.h>
using namespace std;
int x[100011];
int kmap[100011];
int kcount[100011];
int main() {
  int n, k;
  while (cin >> n >> k) {
    memset(kmap, 0, sizeof(kmap));
    memset(kcount, 0, sizeof(kcount));
    int ans = 3 * n - 2;
    for (int i = 1; i <= k; i++) {
      cin >> x[i];
      if (kmap[x[i]] == 0) {
        kmap[x[i]] = i;
        ans--;
      }
    }
    for (int i = k; i >= 1; i--) {
      int a = x[i];
      kcount[a]++;
      if (kmap[a] == i) {
        if (a + 1 <= n) ans = kcount[a + 1] ? ans - 1 : ans;
        if (a - 1 >= 1) ans = kcount[a - 1] ? ans - 1 : ans;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
