#include <bits/stdc++.h>
using namespace std;
map<int, vector<int> > m;
int main() {
  int n, k, query;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < (int)(k); i++) {
    scanf("%d", &query);
    m[query - 1].push_back(i);
  }
  int ans = 0;
  std::vector<int>::iterator low;
  for (int i = 0; i < (int)(n); i++) {
    if (m[i].size() == 0) {
      ans += 3;
      if (i == 0 || i == n - 1) ans--;
    } else {
      if (i - 1 >= 0) {
        low = lower_bound(m[i - 1].begin(), m[i - 1].end(), m[i][0]);
        if (low == m[i - 1].end() || m[i - 1].size() == 0) {
          ans++;
        }
      }
      if (i + 1 < n) {
        low = lower_bound(m[i + 1].begin(), m[i + 1].end(), m[i][0]);
        if (low == m[i + 1].end() || m[i + 1].size() == 0) ans++;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
