#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long a[k];
    for (long long(i) = (0); i < (k); i++) {
      cin >> a[i];
    }
    vector<long long> first(n + 1, INT_MAX);
    vector<long long> last(n + 1, -1);
    for (long long i = 0; i < k; i++) {
      last[a[i]] = i;
    }
    for (long long i = k - 1; i >= 0; i--) {
      first[a[i]] = i;
    }
    long long ans = 0;
    for (long long i = 1; i <= n; i++) {
      for (long long j = max((long long)1, i - 1); j <= (min(n, i + 1)); j++) {
        if (i == j) {
          if (last[i] == -1) {
            ans++;
          }
        } else {
          if ((last[i] - first[j]) <= 0) {
            ans++;
          }
        }
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
