#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
long long ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1},
          ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
const long long MAX = 1e6 + 2047;
const long long mod = 1e9 + 7;
const long long MAX_2 = 1009;
void sout() { cout << "\n"; }
template <typename T, typename... Types>
void sout(T var1, Types... var2) {
  cout << var1 << " ";
  sout(var2...);
}
template <typename T>
void sout(vector<T> arr) {
  for (auto it : arr) {
    cout << it << " ";
  }
  sout();
}
template <typename T>
void sout(set<T> st) {
  for (auto it : st) {
    cout << it << " ";
  }
  sout();
}
void test_case() {
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  vector<long long> arr(k);
  map<long long, long long> mp;
  map<long long, long long> up;
  set<long long> st;
  long long cnt = 0;
  for (auto &it : arr) {
    cin >> it;
    cnt++;
    if (mp[it] == 0) {
      mp[it] = cnt;
    }
    up[it] = cnt;
    st.insert(it);
  }
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    for (auto it : {-1, 0, 1}) {
      long long x = i + it;
      if (x >= 1 && x <= n) {
        if ((x == i && st.count(x) == 0) || (mp[i] > up[x]) ||
            (mp[x] == 0 || mp[i] == 0)) {
          ans++;
        }
      }
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  long long t = 1;
  while (t--) {
    test_case();
  }
}
