import sys

MOD=10**9+7
N,M=map(int,input().split())
bad=set(map(int,sys.stdin))

a,b=0,1
for i in range(1,N+1):
    if i not in bad:
        a,b=b,(a+b)%MOD
    elif a>0:
        a,b=b,0
    else:
        break

print(b)
