def fib(n):
    if n==1:
        a=1
        return ans
    if n==2:
        a=1
        return ans
    a0=1
    a1=1
    cnt=2
    while cnt <n:
        a=a0+a1
        cnt+=1
        a0=a1
        a1=a
    return a


N,M=map(int,input().split())

mod=10**9+7

if N==1:
    print(1)
    exit()

a0=-1
ans=1
for i in range(M):
    a=int(input())
    n=(a-1)-(a0+1)
    if a-a0==1:
        print(0)
        exit()
    c=fib(n+1)
    ans=(ans*c)%mod
    a0=a

a = N+1
n = (a - 1) - (a0 + 1)
c = fib(n+1)
ans=(ans*c)%mod

print(ans)


