#include <iostream>
using namespace std;
#define MOD 1000000007
int main()
{
	// 入力
    int n , m;
    cin >>n >>m;
    int l, i=0, a[m];
    while(cin>>l){
        a[i] = l;
        i++;
    }
  	// 計算
    int j = 2;
    int k = 1;
    int c[n];
    int kekka;
    c[0] = 1;
    c[1] = 1; 
    for(j;j<=n;j++){
    	if (j =! a[k] ){
        	c[j] = c[j-1] + c[j-2];
        }
        if (j == a[k]){
        	k =k +1;
        }
    }
    kekka = c[n]%MOD;
    cout << kekka;
	}
    return 0;
}