import sys
import math

n,m = map(int,input().split())
a_list = list(int(input()) for i in range(m))

if a_list[0] != 1:
    x_list = [1,1] 
else:
    x_list = [1,0]

for i in range(n-1):
    if len(x_list) not in a_list:
        x_list.append(x_list[-2] + x_list[-1])
    else:
        x_list.append(0)

print(x_list[-1]%1000000007)