import math
n, m = [int(i) for i in input().split()]
p = [int(input()) for i in range(m)]

a = []
a.append(0)
a.append(1)
a.append(2)
for i in range(3, n + 1):
    if i in p:
        a.append(0)
    else:
        a.append(a[i - 2] + a[i - 1])
    
print(a[n] % 1000000007)