N, M = map(int, input().split())
a_list = [None] * M
for i in range(M):
    a_list[i] = int(input())
mod = 1000000007

ways = [0] * (N + 1)
ways[N] = 1
ways[N - 1] = 1
for n in reversed(range(N - 1)):
    if n in a_list:
        continue
    ways[n] = (ways[n + 1] + ways[n + 2]) % mod
print(ways[0])
