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

dp = [0]*(N+1)

def stair(x):
    if(x in a):
        dp[x] = 0
        return 0
    if(x == 1 and x not in a):
        dp[x] = 1
        return 1
    if(x == 0):
        dp[x] = 1
        return 1
    if(dp[x] != 0):
        return dp[x]
    dp[x] = stair(x-1) + stair(x-2)
    return dp[x]
        
print(stair(N) % (10**9 + 7))