n, m = map(int, input().split())

#通過できない階段をaに格納
a = [int(input()) for _ in range(m)]    
count = [0]*(n+1)
count[0] = 1
for i in range(1,n+1):
    if i not in a:
        count[i] = count[i-1]+count[i-2]        

print(count[-1]%(10**9+7))
