#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
int lps[MAX_N], rps[MAX_N];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  fill(lps, lps + n, k);
  fill(rps, rps + n, -1);
  for (int i = 0; i < k; i++) {
    int xi;
    scanf("%d", &xi), xi--;
    if (lps[xi] >= k) lps[xi] = i;
    rps[xi] = i;
  }
  int cnt = 0;
  for (int x = 0; x < n; x++) {
    if (rps[x] < 0) cnt++;
    if (x > 0 && lps[x] >= rps[x - 1]) cnt++;
    if (x + 1 < n && lps[x] >= rps[x + 1]) cnt++;
  }
  printf("%d\n", cnt);
  return 0;
}
