import sys
from functools import reduce

n, m = list(map(int, input().split()))

l = [0]
for i in range(m):
    l.append(int(input()))
    if l[i] - l[i - 1] == 1:
        sys.exit()
else:
    l.append(n)


result = []

for j in range(len(l)-1):

    z = l[j+1]-l[j]
    dp = [1, 1]

    for i in range(2, z):
        dp.append( dp[i - 1] + dp[i - 2])
    else:
        result.append(dp[-1])

        
result = reduce(lambda x,y:x * y,result)

print(result%1000000007)