#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(k);
  for (int i = 0; i < k; i++) cin >> a[i];
  vector<int> v(n + 1);
  vector<vector<int> > dp(n + 1, vector<int>(3, 1));
  dp[1][2] = dp[n][1] = 0;
  long long an = 0;
  for (int i = k - 1; i >= 0; i--) {
    dp[a[i]][0] = 0;
    if (a[i] + 1 <= n && v[a[i] + 1] == 1) dp[a[i]][1] = 0;
    if (a[i] - 1 >= 1 && v[a[i] - 1] == 1) dp[a[i]][2] = 0;
    v[a[i]] = 1;
  }
  for (int i = 1; i < n + 1; i++) {
    for (int j = 0; j < 3; j++) an += dp[i][j];
  }
  cout << an << endl;
  return 0;
}
