#include <bits/stdc++.h>
using namespace std;
const long INF = 1L << 60;
const int MOD = 1000000007;
int a[100010];
long dp[100010];
bool ok[100010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    ok[a[i]] = true;
  }
  dp[0] = 1;
  for (int i = 0; i <= n; i++) {
    if (!ok[i + 1] && i + 1 <= n) dp[i + 1] += dp[i];
    if (!ok[i + 2] && i + 2 <= n) dp[i + 2] += dp[i];
    dp[i] %= MOD;
  }
  printf("%ld", dp[n]);
}
