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