#include<iostream>
using namespace std;
long long hoge = 1000000007;

int main(){
  int n, m, head = 0;
  // 標準入力
  cin >> n >> m;

  int a[m+1];
  long long s[n+1];
  for ( int i = 0; i < m; i++){ cin >> a[i];}
  a[m] = 0;
  a[m+1] = 0;

  // init
  for ( int i = 0; i <= n; i++){ s[i] = 0;}

  // 1段目
  s[0] = 1;
  s[1] = 1;
  // 2段目から始める
  for ( int i = 2; i <= n; i++){
    if (i = a[head] || i = a[head+1]) {
    s[i] = 0;
    }
    
    if (i-2 == a[head] && i-1 == a[head+1]){
      s[i] = 0;
      break;
    } else if (i-2 == a[head] && i-1 != a[head+1]){
      s[i] = s[i-1];
      head++;
    } else if (i-2 != a[head] && i-1 == a[head]){
      s[i] = s[i-2];
    } else {
      s[i] = s[i-2] + s[i-1];
    }

   s[i] = s[i]%hoge;
  }

  cout << s[n]%hoge << endl;

  return 0;
}
