n,m = map(int,input().split())
ans = [1]*n

for i in range(m):
    a = int(input())
    ans[a-1] = 0

if ans[0] != 0 and ans[1] != 0:
    ans[0] = 1
    ans[1] = 2

for i in range(2,n):
    if ans[i] != 0:
        ans[i] = (ans[i-1] + ans[i-2])%1000000007
        
print(ans[n-1])
