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