import sys
sys.setrecursionlimit(100000)

def intinput(): return map(int,sys.stdin.readline().split())

fib=[0,1,1]
for i in range(3,100003):
    fib.append(fib[i-1]+fib[i-2])

n,m=intinput()
mod=10**9+7
a=[int(sys.stdin.readline()) for _ in range(m)]
k=1
y=1
for i in range(n):
    if i in a:
        k*=fib[y-1]
        y=0
    y+=1
k*=fib[y]
print(k%mod)