#include <bits/stdc++.h>
using namespace std;
int a[100010];
bool vis[100010];
stack<int> s;
int n, m;
int ass;
void dfs(int c) {
  s.push(c);
  while (!s.empty()) {
    int now, next1, next2;
    now = s.top();
    next1 = now + 1;
    next2 = now + 2;
    s.pop();
    if (vis[now]) {
      return;
    }
    if (now == n) {
      ass++;
      ass %= 1000000007;
      return;
    }
    dfs(next1);
    if (next2 <= n) {
      dfs(now + 2);
    }
  }
}
int main() {
  while (~scanf("%d %d", &n, &m)) {
    ass = 0;
    memset(vis, 0, sizeof(vis));
    while (m--) {
      int biao;
      scanf("%d", &biao);
      vis[biao] = 1;
    }
    dfs(0);
    printf("%d\n", ass % 1000000007);
  }
  return 0;
}
