N, M = map(int, input().split())
a = [int(input())-1 for _ in range(M)]
mod =  1000000007
ret = [0] * N
for i in range(N):
    if i in a:
        continue
    elif i < 2:
        ret[i] = ret[i]+1
    else:
        ret[i] = ret[i-2] + ret[i-1]
        if ret[i] == 0:
            break


print(ret[len(ret)-1]%mod)
