N, M =  map(int, input().split())
a_list = [int(input()) for _ in range(M)]
ans_list = [1] + [0] * N

for i in range(1, N+1):
    if i == 1:
        if 1 not in a_list:
            ans_list[1] += ans_list[i-1]
    else:
        if i not in a_list:
            ans_list[i] += ans_list[i-2]
            ans_list[i] += ans_list[i-1]

print(int(ans_list[-1]%1000000007))