#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
void read(vector<int> &a) {
  for (auto &x : a) cin >> x;
}
void read(vector<int64_t> &a) {
  for (auto &x : a) cin >> x;
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug &operator<<(const c &) {
    return *this;
  }
};
const int MOD = 1e9 + 7;
const int INF = (int)2e9 + 7;
const int64_t LINF = (int64_t)1e18;
const long double PI = 3.1415926535897932384626433832795;
void solve() {
  int n, k;
  cin >> n >> k;
  set<pair<int, int>> s;
  for (int i = 1; i <= n; i++) {
    s.insert({i, i});
  }
  for (int i = 1; i < n; i++) {
    s.insert({i, i + 1});
  }
  for (int i = n; i > 1; i--) {
    s.insert({i, i - 1});
  }
  vector<int> v(k);
  read(v);
  vector<int> last(n + 1, -1), first(n + 1, -1);
  for (int i = 0; i < k; i++) {
    last[v[i]] = i;
  }
  for (int i = k - 1; i >= 0; i--) {
    first[v[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (first[i] != -1) {
      s.erase({i, i});
    }
  }
  for (int i = 1; i < n; i++) {
    if (last[i + 1] == -1 || first[i] == -1) {
      continue;
    }
    if (last[i + 1] >= first[i]) {
      s.erase({i, i + 1});
    }
  }
  for (int i = n; i > 1; i--) {
    if (last[i - 1] == -1 || first[i] == -1) {
      continue;
    }
    if (last[i - 1] >= first[i]) {
      s.erase({i, i - 1});
    }
  }
  cout << (int)s.size();
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test_cases = 1;
  auto t1 = high_resolution_clock::now();
  for (int tt = 1; tt <= test_cases; tt++) {
    solve();
  }
  auto t2 = high_resolution_clock::now();
  auto time = duration_cast<duration<double>>(t2 - t1);
  cerr << "Time elapsed = " << time.count() << "\n";
}
