Num = 1000000007 
N,M = map(int,input().split())
a = []
for i in range(M):
    a.append(int(input()))
now = 0
if 1 in a:
    prev1 = 0
else:
    prev1 = 1
prev2 = 1

for i in range(2,N+1):
    if i in a:
        now = 0
        prev2 = prev1
        prev1 = now 
        continue
    else:
        now = prev1 +prev2
        prev2 = prev1
        prev1 = now

print(now%Num)