import sys
N, M = map(int, input().split())

a = [int(line) for line in sys.stdin]

ans = [0] * (N + 1)

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

print(ans[N] % 1000000007)
