from sys import stdin
N, M = [int(_) for _ in stdin.readline().rstrip().split()]
A = [int(stdin.readline().rstrip()) for _ in range(M)]

def solve(n):
    dp = []
    for i in range(n+1):
        if i in A:
            dp.append(0)
        else:
            dp.append(1)
    for i in range(2, n+1):
        if dp[i] == 0:
            continue
        dp[i] = dp[i-1]+dp[i-2]
    return dp[n] % 1000000007

print(solve(N))
