#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  int g[k + 1], freq[n + 1];
  memset(freq, 0, sizeof(freq));
  for (int i = 1; i <= k; i++) {
    cin >> g[i];
    freq[g[i]]++;
  }
  int answer = 0;
  bool visited[n + 1];
  memset(visited, false, sizeof(visited));
  for (int i = 1; i <= k; i++) {
    if (visited[g[i]]) {
      freq[g[i]]--;
      continue;
    }
    freq[g[i]]--;
    if (g[i] == 1) {
      if (freq[g[i] + 1] == 0) {
        answer++;
      }
    } else if (g[i] == n) {
      if (freq[g[i] - 1] == 0) {
        answer++;
      }
    } else {
      if (freq[g[i] + 1] == 0) {
        answer++;
      }
      if (freq[g[i] - 1] == 0) {
        answer++;
      }
    }
    visited[g[i]] = true;
  }
  for (int i = 1; i <= n; i++) {
    if (!visited[i]) {
      answer += 3;
      if (i == 1 || i == n) {
        answer--;
      }
    }
  }
  cout << answer;
  return 0;
}
