def main(A, dq, n):
    if n == -1:
        return dq[0]

    if (n in A) == False: 
        dp[n] = dp[n + 1] + dp[n + 2]
    return main(A, dq, n-1)
 
N, M = map(int, input().split())
mod = 1000000007
dp = [0] * 10**5
A = [int(input()) for _ in range(M)] 
dp[N], dp[N-1] = 1, 1
ans = main(A, dp, N-2)
print(ans % mod)
