import sys

n, m=map(int, input().split())

#階段上る数求める！x段目からy段目まで上るとき
climb_method=[0]*(n+1)
climb_method[0]=1
climb_method[1]=1
climb_method[2]=2
for i in range(n-2):
    climb_method[i+3]=climb_method[i+2]+climb_method[i+1]

if m==0:
    count=climb_method[n]
    print(count)
    sys.exit()

broken_list=[0]*m
count=0
a=int(input())
broken_list[0]=a
count+=climb_method[a-1]

for i in range(m-1):
    a=int(input())
    broken_list[i+1]=a
    distance=broken_list[i+1]-broken_list[i]
    if distance==1:
        count=0
        print(count)
        sys.exit()
        break
    else:
        count*=climb_method[distance-2]
        

distance=n-broken_list[m-1]
count*=climb_method[distance-1]    


print(count%1000000007)

    
