#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 500;
const long long mod = 1e9 + 7;
const long double eps = 0.0000000000001;
int fi[N], la[N];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  int n, k;
  cin >> n >> k;
  for (int i = 0; i <= n; i++) {
    fi[i] = 2e9;
    la[i] = 2e9;
  }
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    if (fi[x] == 2e9) fi[x] = i;
    la[x] = i;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (i > 1) {
      if (fi[i] > la[i - 1] || la[i - 1] == 2e9) ans++;
    }
    if (i < n) {
      if (fi[i] > la[i + 1] || la[i + 1] == 2e9) ans++;
    }
    if (fi[i] == 2e9) ans++;
  }
  cout << ans;
}
