#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
using namespace std;
const int mod = 1000000007;
int a[100010], vis[100010];
int rifa(int x) {
  if (a[x]) return 0;
  if (vis[x]) return vis[x];
  if (x == 1)
    return 1;
  else if (x == 2)
    return rifa(x - 1) + 1;
  int tmp = (rifa(x - 1) + rifa(x - 2)) % mod;
  vis[x] = tmp;
  return tmp;
}
int main() {
  ;
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    int tmp;
    cin >> tmp;
    a[tmp] = 1;
  }
  cout << rifa(n) << endl;
  return 0;
}
