#an+2 = an+1 + an
n,m = map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
ans = []
for floor in range(1,n+1):
    if floor in a:
        ans.append(0)
    elif floor == 1:
        ans.append(1)
    elif floor == 2:
        ans.append(ans[0] + 1)
    else:
        ans.append(ans[floor-2] + ans[floor-3])
print(ans[n-1]%1000000007)
 