#include <bits/stdc++.h>
using namespace std;
long long a[100010], b[100010];
int main() {
  long long i, j, k, m, n, l, x, ans = 0;
  cin >> n >> k;
  for (i = 1; i <= k; i++) {
    scanf("%lld", &x);
    if (a[x] == 0) a[x] = i;
    b[x] = i;
  }
  for (i = 1; i <= n; i++) {
    if (a[i] == 0) ans++;
    if ((b[i + 1] <= a[i] || a[i] == 0) && i < n) ans++;
    if ((b[i - 1] <= a[i] || a[i] == 0) && i > 1) ans++;
  }
  cout << ans << endl;
}
