N,M=map(int,input().split())
a = [int(input()) for _ in range(M)]
a.append(N+1)
mod=10**9+7

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

ans=fib[a[0]-1]
for i in range(M):
    ans*=fib[a[i+1]-a[i]-2]
    ans%=mod
print(ans)