MOD = 10 ** 9 + 7
n, m = [int(x) for x in input().split()]
A = [int(input()) for i in range(m)]
pattern = [1]
for i in range(1, n + 1):
    if i in A:
        pattern.append(0)
        continue
    if i == 1:
        pattern.append(pattern[i - 1])
    if i > 1:
        pattern.append((pattern[i - 1] + pattern[i - 2]) % MOD)
print(pattern[n])
