N, M = map(int, input().split())
broken_steps = [int(input()) for _ in range(M)]
pattern = [-1] * N
pattern[0] = 0 if 1 in broken_steps else 1
pattern[1] = 0 if 2 in broken_steps else 1 + pattern[0]

for i in range(2, N):
    pattern[i] = 0 if (i + 1) in broken_steps else (pattern[i -2] + pattern[i - 1])

print(pattern[-1] % 1000000007)
