
def main(N, M, a):
    dp = [0] * (N+1)
    dp[0] = 1
    dp[1] = 1 if 1 not in a else 0
    for i in range(2, len(dp)):
        dp[i] = dp[i-1] + dp[i-2] if i not in a else 0
    return dp[-1] % (10**9+7)

N, M = map(int, input().split())
a = list(int(input()) for _ in range(M))
print(main(N,M,a))