#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, s[100000], x = 0, y = 0, z = 0, f1 = 1, f2 = 2, f3, f4[100000];
  cin >> n >> m;
  for (int a = 0; a < m; a++) {
    cin >> s[a];
  }
  for (int i = 0; i < n; i++) {
    if (i != s[y]) {
      x++;
    } else {
      for (int j = 0; j < x; j++) {
        f3 = f1 + f2;
        f1 = f2;
        f2 = f3;
      }
      f4[y] = f3;
      y++;
      x = 0;
      continue;
    }
  }
  for (int k = 0; k < y - 1; k++) {
    z = z + f4[k] * f4[k + 1];
  }
  cout << z << endl;
}
