#計算量爆発で死ぬパターン

D = 1000000007
n, m = map(int, input().split())
a = [0] * (10**5 + 1)
for i in range(m):
    a[int(input())] += 1

# 初期値
s0 = 1
if (a[1] == 1):
    s1 = 0
else:
    s1 = 1


def calc(n):
    if (n == 0):
        return s0
    elif (n == 1):
        return s1
    elif(a[n] == 1):
        return 0
    else:
        return (calc(n-1) + calc(n - 2) % D

print(s[n])