N, M = map(int, input().split())
a = [int(input()) for i in range(M)]

ans = []
ans += [1, 1]
for i in range(2, N + 1):
    if N - i not in a:
        ans.insert(0, (ans[0] + ans[1]) % (10 ** 9 + 7))
    else:
        ans.insert(0, 0)
        
print(ans[0])

