#include <bits/stdc++.h>
using namespace std;
long long int N, M;
long long int arr[100005];
long long int dp[100005];
long long int marked[100005];
long long int rec(int ind) {
  if (ind == N) {
    return 1;
  }
  if (ind > N) {
    return 0;
  }
  long long int &ans = dp[ind];
  if (ans != 0) {
    return ans;
  }
  if (marked[ind + 1] != -1) {
    ans = rec(ind + 1);
    ans %= 1000000007;
  }
  if (marked[ind + 2] != -1) {
    ans = (ans + rec(ind + 2)) % 1000000007;
    ans %= 1000000007;
  }
  return ans;
}
int main() {
  scanf("%lld %lld", &N, &M);
  for (int i = 1; i <= N; i++) {
    marked[i] = i;
  }
  for (int i = 0; i < M; i++) {
    scanf("%lld", &arr[i]);
    marked[arr[i]] = -1;
  }
  memset(dp, 0, sizeof(dp));
  long long int finalAns = rec(0);
  cout << finalAns;
  return 0;
}
