n, m = map(int, input().split())
ans = [1] * (n + 1)
for i in a:
    ans[i] = 0
for i in range(2, n + 1):
    if ans[i]:
        ans[i] = ans[i - 1] + ans[i - 2]
    if ans[i] >= 1000000007:
        ans[i] = ans[i] % 1000000007
print(ans[-1])