N, M = map(int, input().split())
a = [True] * N
for _ in range(M):
    a[int(input())] = False


memo = {}

def find(n):
    if n == 0:
        return 1
    if n == 1:
        return 1
    if n in memo:
        return memo[n]
    memo[n] = (find(n - 1) if a[n - 1] else 0) + (find(n - 2) if a[n - 2] else 0)
    return memo[n]


print(find(N) % 1000000007)