#include <bits/stdc++.h>
using namespace std;
int n, m, sum = 0;
int a[1000000];
int dfs(int x) {
  if (x == n) {
    sum++;
    sum %= 1000000007;
    return 0;
  }
  if (x > n) return 0;
  int flag = 0;
  for (int i = 1; i <= m; i++) {
    if (x + 1 == a[i]) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) dfs(x + 1);
  flag = 0;
  for (int i = 1; i <= m; i++) {
    if (x + 2 == a[i]) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) dfs(x + 2);
}
int main() {
  scanf("%d%d", &n, &m);
  memset(a, 0, sizeof(a));
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]);
  dfs(0);
  printf("%d", sum);
  return 0;
}
