#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000000 + 7;
int n, m;
bool a[100005];
int solve(int x) {
  if (a[x]) return 0;
  if (x == 0 || x == 1) return 1;
  return (solve(x - 1) + solve(x - 2)) % MOD;
}
int main() {
  int t;
  scanf("%d %d", &n, &m);
  while (m--) {
    scanf("%d", &t);
    a[t] = true;
  }
  printf("%d", solve(n));
  return 0;
}
