n,m=map(int,input().split())
a=[]
for i in range(m):
  b=int(input())
  a.append(b)

def count(x):
    if x==-1:
        return 0
    elif x==0:
        return 1
    elif x in a:
        return 0
    else:
        return count(x-2)+count(x-1)
    
print(count(n)%1000000007)