n, m = map(int, input().split())

a = []
#通過できない階段をaに格納
for _ in range(m):
    a.append(int(input()))
    
count = [0]*(n+1)
count[0] = 1
for i in range(1,n+1):
    if i in a:
        count[i] = 0
    else:
        count[i] = count[i-1]+count[i-2]

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