N, M = map(int, input().split())
a_list = [int(input()) for _ in range(M)]

mod = 1000000007

result = []

for i in range(N+1):
    if i in a_list:
        result += [0]
    elif i == 0 or i == 1:
        result += [1]
    else:
        result += [(result[i-1]+result[i-2]) % mod]
        
print(result[-1])