#include <bits/stdc++.h>
using namespace std;
const long long int INF = 9223372036854775807;
const long long int mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, k;
  cin >> n >> k;
  vector<int> x(k);
  vector<int> first(n + 1, 0);
  vector<int> last(n + 1, 0);
  for (int i = 0; i < k; i++) {
    cin >> x[i];
    if (first[x[i]] == 0) {
      first[x[i]] = i + 1;
      last[x[i]] = i + 1;
    } else {
      last[x[i]] = i + 1;
    }
  }
  if (n == 1) {
    if (first[1] == 0)
      cout << 1;
    else
      cout << 0;
  } else {
    int count = 0;
    if (first[1] == 0) {
      count += 2;
    } else {
      if (first[2] == 0) {
        count += 1;
      } else {
        if (first[1] < last[2]) {
          count += 0;
        } else {
          count++;
        }
      }
    }
    if (first[n] == 0) {
      count += 2;
    } else {
      if (first[n - 1] == 0) {
        count += 1;
      } else {
        if (first[n] < last[n - 1]) {
          count += 0;
        } else {
          count++;
        }
      }
    }
    for (int i = 2; i <= n - 1; i++) {
      if (first[i] == 0) {
        count += 3;
      } else {
        if (first[i + 1] == 0) {
          count += 1;
        } else {
          if (first[i] < last[i + 1])
            count += 0;
          else {
            count++;
          }
        }
        if (first[i - 1] == 0) {
          count += 1;
        } else {
          if (first[i] < last[i - 1])
            count += 0;
          else {
            count++;
          }
        }
      }
    }
    cout << count;
  }
}
