N, M = map(int, input().split())
MOD = 10**9+7
a = set()
for i in range(M):
    a.add(int(input()))

memo = [-1]*(N+1)
memo[0] = 1

def dodp(x):
    if memo[x] != -1:
        pass
    elif x in a:
        memo[x] = 0
    elif x == 1:
        memo[x] = dodp(x-1)
    else:
        memo[x] = dodp(x-1)+dodp(x-2)
    memo[x] %= MOD
    return memo[x]
    
dodp(N)
print(memo[N])
