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

memo = {}
def dfs(height):
    if height in memo:
        return memo[height]
    if height == N:
        memo[height] = 1
        return 1
    elif height > N:
        return 0
    if height in a:
        memo[height] = 0
        return 0
    step1 = dfs(height + 1)
    step2 = dfs(height + 2)
    if step1 == 0 and step2 == 0:
        memo[height] = 0
        return 0
    else:
        memo[height] = step1 + step2
        return step1 + step2
        
print(dfs(0) % 1000000007)