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

def fib(x):
    if x==-1:
        count=0
    elif x==0:
        count=1
    else:
        count=fib(x-1)+fib(x-2)
    return count
    
for i in range(m+1):
    ans=ans*fib(a[i+1]-a[i]-2)
    
print(ans%1000000007)