n, m = map(int, input().split())
broken = []
for i in range(m):
    broken.append(int(input()))
num = {0: int(0 not in broken), 1: int(1 not in broken)}

for i in range(2, n):
    if i in broken:
        num[i] = 0
    else:
        num[i] = num[i-1] + num[i-2]
        
print((num[n-1]+num[n-2])%(1000000007))