N,M = list(map(int, input().split()))
a = [int(input()) - 1 for i in range(M)]
memo = [0 for i in range(N)]

for i in range(N):
    if i in a:
        memo[i] = 0
        continue
    if i == 0:
        memo[i] = 1
        continue
    if i == 1:
        memo[i] = 1 + memo[0]
        continue
    memo[i] = (memo[i-1] + memo[i-2]) % 1000000007

print(memo[N-1])
