N, M =map(int,input().split())

broken = []
ans = [0]*(N+1)

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

ans[0] = 1
if(broken[0] == 1):
    ans[1] = 0
else:
    ans[1] = 1

for i in range(2,N+1):
    if (i in broken):
        ans[i] = 0
    else:
        ans[i] = ans[i-1] + ans[i-2]
    

print(ans[N]%1000000007)