#include <bits/stdc++.h>
using namespace std;
int f[100005], s[100005];
int main() {
  int n, k, inp;
  scanf("%d %d", &n, &k);
  for (int i = 1; i < k + 1; i++) {
    scanf("%d", &inp);
    s[inp] = i;
    if (!f[inp]) f[inp] = i;
  }
  int ans = 0;
  for (int i = 1; i < n + 1; i++) {
    if (!f[i]) {
      ans += 3;
      if (i == 1 || i == n) ans--;
      continue;
    }
    int b = i - 1;
    if (b >= 1 && s[b] < f[i]) ans++;
    b = i + 1;
    if (b <= n && s[b] < f[i]) ans++;
  }
  cout << ans << '\n';
  return 0;
}
