#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  if (n == 1) {
    return cout << 0, 0;
  }
  vector<long long> a(k + 2);
  map<long long, long long> mp, vis;
  for (long long i = 1; i <= k; i++) {
    cin >> a[i];
    mp[a[i]]++;
    vis[a[i]] = 0;
  }
  long long res = (n - 2) * 3 + 4;
  for (long long i = 1; i <= k; i++) {
    mp[a[i]]--;
    if (vis[a[i]]) continue;
    if (a[i] == 1 || a[i] == n) {
      res--;
      if (a[i] == 1) {
        if (mp[a[i] + 1] != 0) res--;
      } else {
        if (mp[a[i] - 1] != 0) res--;
      }
    } else {
      res--;
      if (mp[a[i] + 1] != 0) res--;
      if (mp[a[i] - 1] != 0) res--;
    }
    vis[a[i]] = 1;
  }
  assert(res >= 0);
  cout << res;
  return 0;
}
