#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int tab[k + 5];
  int mx[n + 5];
  int cnt[n + 5];
  int inc[n + 5];
  int dec[n + 5];
  for (int i = 0; i <= n + 4; i++) {
    mx[i] = 0;
    cnt[i] = 0;
    inc[i] = 0;
    dec[i] = 0;
  }
  for (int i = 1; i <= k; i++) {
    scanf("%d", &tab[i]);
    cnt[tab[i]]++;
    mx[tab[i]] = i;
  }
  for (int i = 1; i <= k; i++) {
    if (tab[i] + 1 <= n && mx[tab[i] + 1] > i) {
      inc[tab[i]] = 1;
    }
    if (tab[i] - 1 >= 1 && mx[tab[i] - 1] > i) {
      dec[tab[i]] = 1;
    }
  }
  int sub = 0;
  for (int i = 1; i <= n; i++) {
    if (cnt[i] > 0) sub++;
    if (inc[i] > 0) sub++;
    if (dec[i] > 0) sub++;
  }
  printf("%d", 3 * n - 2 - sub);
}
