N,M = map(int,input().split())
step  = [-1] * N

for _ in range(M):
    a = int(input())
    step[a-1] = 0

if step[0] == -1:
    step[0] = 1

if step[1] == -1:
    step[1] = step[0]+1

for i in range(2,N):
    if step[i] == -1:
        step[i] = step[i-1]+step[i-2]

print(step[N-1] % 1000000007)
