#C問題
N,M = map(int,input().split())
a = []
for i in range(M):
    a.append(int(input()))

DP = [0 for i in range(N)]
for i in range(N):
    if i == 0:
        if i+1 not in a:
            DP[0] = 1
        else:
            DP[0] = 0
    elif i == 1:
        if i+1 not in a:
            DP[1] = DP[0]+1
        else:
            DP[1] = 0
    else:
        if i+1 not in a:
            DP[i] = DP[i-1]+DP[i-2]
        else:
            DP[i] = 0
            
print(DP[N-1]%1000000007)
