N, M = map(int, input().split())
a = []
for _ in range(M):
    a.append(int(input()))

arr=[0]*N

if 1 in a:
    arr[0]=0
else:
    arr[0]=1

if 2 in a:
    arr[1]=0
else:
    arr[1]=1+arr[0]
    
for i in range(2,N):
    if i+1 in a:
        arr[i]=0
    else:
        arr[i]=arr[i-1]+arr[i-2]

print(arr[-1]%(10**9+7))