#import <Foundation/Foundation.h>
#define MM 1000000007
typedef long long INT;
int main(){
    @autoreleasepool {
        NSMutableSet *set = [NSMutableSet set];
        INT N,M;
        scanf("%lld %lld",&N,&M);
        for(INT i=0;i<M;i++){
            INT a;
            scanf("%lld",&a);
            [set addObject:@(a)];
        }
        INT a=0;
        INT b=1;
        for(INT i=1;i<=N;i++) {
            if ([set containsObject:@(i)]) {
                a=b;
                b=0;
            } else {
                INT c = (a+b) % MM;
                a=b;
                b=c;
            }
        }
        printf("%lld",b);
    }
}
