#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m;
  cin >> n >> m;
  long long arr[n + 1], brr[n + 1], crr[m];
  memset(arr, 0, sizeof(arr));
  memset(brr, 0, sizeof(brr));
  for (long long i = 0; i < m; ++i) {
    cin >> crr[i];
    arr[crr[i]]++;
  }
  long long ans = 0;
  for (long long i = 1; i < n + 1; ++i) {
    if (arr[i] == 0) {
      if (i == 1 || i == n)
        ans += 2;
      else
        ans += 3;
    }
  }
  for (long long i = 0; i < m; ++i) {
    brr[crr[i]]++;
    if (brr[crr[i]] == 1) {
      if (crr[i] != 1 && arr[crr[i] - 1] - brr[crr[i] - 1] == 0) ans++;
      if (crr[i] != n && arr[crr[i] + 1] - brr[crr[i] + 1] == 0) ans++;
    }
  }
  cout << ans;
  return 0;
}
