#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int N = 1e5 + 5;
int n, k, a[N], occur1[N], occur2[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    if (!occur1[a[i]]) {
      occur1[a[i]] = occur2[a[i]] = i;
    } else {
      occur2[a[i]] = i;
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int st = i;
    for (int en = max(1, i - 1); en <= min(n, i + 1); en++) {
      int p = ans;
      if (!occur1[st]) {
        ans++;
      } else {
        if (!occur1[en]) {
          ans++;
        } else {
          if (occur2[en] < occur1[st]) {
            ans++;
          }
        }
      }
    }
  }
  cout << ans;
  return 0;
}
