n,m = map(int, input().split())
a = []
for i in range(m):
    a.append(int(input()))

if a[0] == 1:
    x = [1,0]
else:
    x = [1,1]

for i in range(2,n+1):
    if i in a:
        x.append(0)

    else:
        x.append(x[i-1] + x[i-2])

if x[-1] == 0:
    print(0)
else:
    print(x[-1]%1000000007)