#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, inf = 1e9 + 7;
long long n, k, A[N], f[N], c[N];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long i, j, a, b, ans = 0;
  cin >> n >> k;
  for (i = 1; i <= k; i++) cin >> A[i], f[A[i]]++;
  for (i = 1; i <= n; i++)
    if (f[i] == 0) {
      ans++;
      ans += (i > 1);
      ans += (i < n);
    }
  for (i = 1; i <= k; i++) {
    if (A[i] > 1) {
      if (c[A[i] - 1] == f[A[i] - 1] && c[A[i]] == 0) ans++;
    }
    if (A[i] < n) {
      if (c[A[i] + 1] == f[A[i] + 1] && c[A[i]] == 0) ans++;
    }
    c[A[i]]++;
  }
  cout << ans;
}
