#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
template <class T>
inline void ckmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void ckmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
using VI = vector<int>;
int main() {
  std::ios::sync_with_stdio(false);
  int n, k;
  while (cin >> n >> k) {
    vector<int> a(n, -1);
    vector<int> b(n, -1);
    for (int i = 0; i < (k); ++i) {
      int p;
      cin >> p;
      --p;
      if (a[p] < 0) a[p] = i;
      b[p] = i;
    }
    int ret = 0;
    for (int x = 0; x < (n); ++x)
      for (int d = -1; d <= 1; d++) {
        int y = x + d;
        if (y < 0 || y >= n) continue;
        if (a[x] < 0)
          ++ret;
        else if (b[y] < a[x])
          ++ret;
      }
    printf("%d\n", ret);
    break;
  }
  return 0;
}
