n, m = list(map(int, input().split()))
a = [int(input()) for _ in range(m)]


f = []

for i in range(n + 1):
    if i == 0:
        f.append(1)
        continue
    if i in a:
        f.append(0)
        continue
    if i == 1:
        f.append(1)
        continue
    f.append(f[i - 1] + f[i - 2])
    
print(f[n] % 1000000007)
