n, m = [int(i) for i in input().split()]
a = []
for _ in range(m):
    a.append(int(input()))

ways_prev = 0 if 1 in a else 1
ways_i = ways_prev + 0 if 2 in a else ways_prev + 1
for i in range(3, n+1):
    ways_prev, ways_i = ways_i, (ways_prev+ways_i)%(10**9+7)
    ways_i = 0 if i in a else ways_i
else:
    print(ways_i)
