#from itertools import accumulate

n, m = map(int, input().split())
a = []
for _ in range(m):
    a.append(int(input()))
    # 2段続いている場合は最上段にたどり着けない
    if len(a)>=2 and a[-2]+1 == a[-1]:
        print(0)
        exit()

l = [0] * (n+1)

for i in range(n+1):
    if i == 0:
        l[i] = 1
        continue
    
    if i == 1:
        l[i] = 1

    if i in a:
        l[i] = 0
    else:
        l[i] = l[i-2] + l[i-1]

print(l[-1] % 1000000007)