#include <bits/stdc++.h>
using namespace std;
int m1[100005], m2[100005];
int func(int x, int y) {
  if (m1[x] == -1 || m1[y] == -1) return 1;
  if (m1[x] < m2[y]) return 0;
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  int n, k, ele;
  cin >> n >> k;
  memset(m1, -1, sizeof(m1));
  memset(m2, -1, sizeof(m2));
  for (long long i = 0; i < k; i++) {
    cin >> ele;
    if (m1[ele] == -1) {
      m1[ele] = i;
      m2[ele] = i;
    } else {
      m2[ele] = i;
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (i - 1 > 0) ans += func(i, i - 1);
    if (m1[i] == -1) ans++;
    if (i + 1 <= n) ans += func(i, i + 1);
  }
  cout << ans;
}
