N, M = map(int, input().split())
List = [int(input()) for _ in range(M)]

P = 10**9+7
dp = [0]*(N+1)

dp[0] = 1
dp[1] = 1

for i in range(1, N):
    if i not in List:
        dp[i+1] = dp[i]+dp[i-1]
    else:
        dp[i] = 0
        dp[i+1] = dp[i-1]
            
print(dp[N]%P)