nn, m = map(int, input().split())
a = []
sum = []
for i in range(m):
    a.append(int(input()))
def count(n):
    if n < 0:
        return 0
    if n == 0:
        return 1
    if n in a:
        return 0
    if n == 1:
        return 1
    return sum[n - 1] + sum[n - 2]

for i in range(nn + 1):
    sum.append(count(i))
print(sum[nn] % 1000000007)
