n, m = list(map(int, input().split()))
a = [input() for i in range(m)]
total_act = 0
total_act2 = 1
total = 1
for i in range(n + 1):
    if str(i) not in a:
        total_act3 = total_act2 + total_act
        total_act2 = total_act
        total_act = total_act3
    else:
        total *= total_act
        total_act = 0
        total_act2 = 1
total *= total_act
print(total % 1000000007)
