from collections import deque
N, M = map(int, input().split())
broken = [int(input())-1 for i in range(M)] #indexは0からなので、-1
broken = set(broken)

if 0 in broken:
    if 1 in broken:
        stairs=deque([0,0])
    else:
        stairs=deque([0,1])
else:
    if 1 in broken:
        stairs=deque([1,0])
    else:
        stairs=deque([1,2])

for i in range(2,N):
    if i in broken:
        stairs.append(0)
    else:
        stairs.append((stairs[i-1]+stairs[i-2])%(10**9 + 7))
print(stairs[-1])