n,m = map(int, input().split())
a = [int(input()) for i in range(m)]
memo = [0]*(n+1)

memo[0] = 1
if 1 in a:
    memo[1] = 0
else:
    memo[1] = 1
for i in range(2,n+1):
    if i in a:
        continue
    memo[i] = memo[i-1] + memo[i-2]

print(memo[n]%1000000007)