#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    int a[105];
    memset(a, 0, sizeof(a));
    for (int i = 0; i < m; i++) {
      int x;
      scanf("%d", &x);
      a[x] = -1;
    }
    a[0] = 1;
    for (int i = 1; i <= n; i++) {
      if (a[i] == -1)
        a[i] = 0;
      else {
        if (i >= 2) {
          a[i] = a[i - 1] % mod + a[i - 2] % mod;
        } else {
          a[i] = a[i - 1] % mod;
        }
        a[i] %= mod;
      }
    }
    printf("%d\n", a[n]);
  }
  return 0;
}
