N, M = map(int, input().split())
a = []
mod = 1000000007

for i in range(M):
    a.append(int(input()))

DP = [0]*(N+1)
DP[0] = 1
if 1 in a:
    DP[1] = 0
else:
    DP[1] = 1

for i in range(2, N+1):
    if(i in a):
        continue
    else:
        DP[i] = (DP[i-1]+DP[i-2])%mod
        
print(DP[N])