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