mod = 10 ** 9 + 7

n,m = map(int,input().split())
lis = [int(input()) for x in range(m)]
if n == 1:
    print(1)
elif n == 2:
    print(2)
stairs = [0 for x in range(n)]
stairs[0] = 1
if 1 in lis:
    stairs[1] = 0
else:
    stairs[1] = 1
#print(stairs)
f = 0
for x in range(2,n):
    if x in lis:
        stairs[x] = 0
    else:
        stairs[x] = (stairs[x-1] + stairs[x-2]) % mod
    
#print(stairs)
print((stairs[n-1] + stairs[n-2]) % mod)
    
