#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a;
  int b;
  cin >> b;
  a.push_back(b);
  int beforeEmpty = b;
  for (int i = 1; i < M; i++) {
    int s;
    cin >> s;
    if (beforeEmpty + 1 == s) {
      cout << 0;
      return 0;
    }
    a.push_back(s);
    beforeEmpty = s;
  }
  vector<int> buf;
  buf.push_back(1);
  buf.push_back(1);
  int i = 0;
  while (i < N) {
    buf[i] = buf[i - 1] + buf[i - 2];
    i++;
  }
  cout << buf[i];
}
