#ABC129C - Typical Stairs
N, M = list(map(int,input().split()))
dp = [-1]*(N+1)
dp[0] = 1
for j in range(M):
    a = int(input())
    dp[a] = 0
if dp[1] == 0:
    dp[1] = 0
    dp[2] = 1
elif dp[1] == -1:
    dp[1] = 1
for i in range(2,N+1,1):
    if dp[i] == -1:
        dp[i] = dp[i-1] + dp[i-2]
    #print(dp[i])
print(dp[N] % 1000000007)