n, m = map(int, input().split())
broken = []
for i in range(m):
    broken.append(int(input()))
    if len(broken) > 1 and broken[-2] + 1 == broken[-1]:
        print(0)
        exit()
    

dp = [0] * (n + 1)

i = n
while i > -1:
    if i >= n-1:
        dp[i] = 1
        i -= 1
        continue
    if i in broken:
        dp[i] = 0
        i -= 1
        continue
        
    dp[i] = dp[i+1] + dp[i+2]
    i -= 1
    
print(dp[0]%1000000007)
