# -*- coding: utf-8 -*-

N,M = list(map(int, input().rstrip().split()))
a_list = [int(input().strip()) for _ in range(M)]
#-----

step = ["x",1,2] + ["x"]*(N-2)

for i in a_list:
    step[i] = 0


for i in range(3,N+1):
    if step[i] == "x":
        step[i] = ( step[i-1] + step[i-2] ) % (10**9 + 7)

print(step[-1])
