import sys
from functools import lru_cache
N, M = map(int, input().split())
ok = [True] * (N + 1)
for _ in range(M):
    a = int(sys.stdin.readline())
    ok[a] = False

@lru_cache(maxsize=None)
def f(s):
    if not ok[s]:
        return 0
    if s in (0, 1, 2):
        return s
    count = f(s - 1) + f(s - 2)
    count %= 1000000007
    return count

ans = f(N)
print(ans)