#include <bits/stdc++.h>
using namespace std;
long long BS(vector<pair<long long, long long> > &PS, long long s, long long e,
             long long ser) {
  if (s > e) return s;
  long long mid = (s + e) / 2;
  if (PS[mid].first == ser) {
    return mid;
  } else if (PS[mid].first > ser) {
    return BS(PS, s, mid - 1, ser);
  } else
    return BS(PS, mid + 1, e, ser);
}
long long explore(vector<vector<long long> > &graph, long long s, long long SA,
                  vector<long long> &vis, long long &cutted) {
  SA++;
  vis[s] = 1;
  for (long long i = 0; i < graph[s].size(); i++) {
    if (vis[graph[s][i]] == 0) {
      SA += explore(graph, graph[s][i], 0, vis, cutted);
    }
  }
  if (SA % 2 == 0) {
    cutted++;
    return 0;
  } else
    return SA;
}
void DFS(vector<pair<long long, long long> > &V, long long s,
         vector<long long> &vis) {
  vis[s] = 1;
  for (long long i = 1; i <= V.size(); i++) {
    if (vis[i])
      continue;
    else if ((V[s - 1].first > V[i - 1].first) &&
             (V[s - 1].first < V[i - 1].second))
      DFS(V, i, vis);
    else if ((V[s - 1].second > V[i - 1].first) &&
             (V[s - 1].second < V[i - 1].second))
      DFS(V, i, vis);
  }
}
int main() {
  long long n, k, i, q, v;
  cin >> n >> k;
  vector<long long> V(k);
  vector<pair<long long, pair<long long, pair<long long, long long> > > > AD(n +
                                                                             2);
  for (i = 0; i < k; i++) {
    cin >> v;
    V[i] = v;
  }
  long long moves = 3 * n - 2;
  for (i = 0; i < k; i++) {
    if (AD[V[i]].first == 0) {
      AD[V[i]].first++;
      moves--;
      AD[V[i]].second.first++;
      if ((V[i] != 1) and (AD[V[i] - 1].first > 0)) {
        moves--;
        AD[V[i]].second.first++;
        AD[V[i]].second.second.first++;
      }
      if ((V[i] != n) and (AD[V[i] + 1].first > 0)) {
        moves--;
        AD[V[i]].second.first++;
        AD[V[i]].second.second.second++;
      }
    } else if (AD[V[i]].first > 0) {
      AD[V[i]].first++;
      if (V[i] != 1 and V[i] != n) {
        moves = moves + AD[V[i]].second.first;
        if ((AD[V[i] - 1].first > 0) && AD[V[i]].second.second.first == 0) {
          AD[V[i]].second.first++;
          AD[V[i]].second.second.first++;
        }
        if ((AD[V[i] + 1].first > 0) && AD[V[i]].second.second.second == 0) {
          AD[V[i]].second.first++;
          AD[V[i]].second.second.second++;
        }
        AD[V[i]].second.first = min(3LL, AD[V[i]].second.first);
        moves = moves - min(3LL, AD[V[i]].second.first);
      } else {
        moves = moves + AD[V[i]].second.first;
        if ((V[i] == 1) and (AD[V[i] + 1].first > 0) and
            (AD[V[i]].second.second.second == 0)) {
          AD[V[i]].second.first++;
          AD[V[i]].second.second.second++;
        }
        if ((V[i] == n) and (AD[V[i] - 1].first > 0) and
            AD[V[i]].second.second.first == 0) {
          AD[V[i]].second.first++;
          AD[V[i]].second.second.first++;
        }
        AD[V[i]].second.first = min(2LL, AD[V[i]].second.first);
        moves = moves - min(2LL, AD[V[i]].second.first);
      }
    }
  }
  cout << max(moves, 0LL);
  return 0;
}
