#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int mod = 1000000007;
bool remender(long long a, long long b) { return a % b; }
int p[200005], siz[200005];
int get(int x) { return p[x] = (x == p[x] ? x : get(p[x])); }
void unio(int u, int v) {
  int a = get(u);
  int b = get(v);
  if (a == b) return;
  if (siz[a] > siz[b]) swap(a, b);
  p[b] = a;
  siz[a] += siz[b];
}
void solve() {
  int n;
  cin >> n;
  int k;
  cin >> k;
  map<int, int> m, m1;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    if (m[x] == 0) m[x] = i + 1;
    m1[x] = i + 1;
    ;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (m1[i] == 0) {
      if (i == 1 || i == n)
        ans += 2;
      else
        ans += 3;
      continue;
    }
    if (i - 1 > 0 && m1[i - 1] < m[i]) ans++;
    if (i + 1 < n + 1 && m1[i + 1] < m[i]) ans++;
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
