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

a_s = []

for _ in range(M):
    a_m = int(input())
    a_s.append(a_m)

def count(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in a_s:
        return 0
    else:
        return count(n-1) + count(n-2)

ans = count(N) % 1000000007;

print(ans)
