n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
dan = [0]*(n+1)
dan[0] = 1

for i in range(1,n+1):
    if i not in a:
        dan[i] += dan[i-1]
        if i >= 2:
            dan[i] += dan[i-2]

print(dan[n]%(10**9+7))