#include <bits/stdc++.h>
using namespace std;
long long int mo = 1000000007;
bool greed(const pair<int, int> a, const pair<int, int> b) {
  return (a.first - a.second) > (b.first - b.second);
}
int a[100005], b[100005];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    if (a[x] == 0) a[x] = i + 1;
    b[x] = i + 1;
  }
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }
  long long int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) ans++;
  }
  if (a[1] > b[2] || a[1] == 0) ans++;
  if (a[n] > b[n - 1] || a[n] == 0) ans++;
  for (int i = 2; i < n; i++) {
    if (a[i] == 0) ans += 2;
    if (a[i] > b[i - 1]) ans++;
    if (a[i] > b[i + 1]) ans++;
  }
  cout << ans << endl;
}
