N,M = (int(i) for i in input().split())
a = [int(input()) for i in range(M)]
hoge = [0] * N
if 1 not in a:
    hoge[0] = 1
if 2 not in a and N >= 2:
    hoge[1] = hoge[0] + 1

for i in range(2,N):
    if i + 1  in a:
        hoge[i] = 0
        if i not in a:
            hoge[i] += hoge[i - 1]
        elif (i-1) not in a:
            hoge[i] += hoge[i - 2]

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