n,m = map(int,input().split())
displace = []
for _ in range(m):
    displace.append(int(input()))

dp = [1]
if 1 in displace:
    dp.append(0)
else:
    dp.append(1)

for i in range(2,n+1):
    next_case = 0
    if i not in displace:
        next_case += dp[i-1]+dp[i-2]
    dp.append(next_case%1000000007)
print(dp[-1])