import numpy as np

n,m = map(int,input().split())
a = np.array([int(input()) for i in range(m)])

dp = np.zeros(n+2)
dp[0] = 1
for i in range(0, a[0]):
    dp[i+2] += dp[i]
    dp[i+1] += dp[i]
for i in range(m-1):
    for j in range(a[i]+1, a[i+1]):
        dp[j+2] += dp[j]
        dp[j+1] += dp[j]
for i in range(a[m-1]+1, n):
    dp[i+2] += dp[i]
    dp[i+1] += dp[i]
print(int(dp[n])%1000000007)