mod = 10**9 + 7

n, m = map(int, input().split())
a = [0] * (n + 1)

for i in range(m):
    a[int(input())] = 1

l = [0] * (n + 1)
l[n] = 1
l[n-1] = 1
if a[n-1] == 1:
    l[n-1] = 0

num = n - 2
while num >= 0:
    if a[num] == 0:
        l[num] = (l[num+1] % mod) + (l[num+2] % mod)
    else:
        l[num] = 0
    num -= 1

print(l[0])