dp = [1] * (10**5 + 1)
dp[1] = 1
dp[2] = 2
for i in range(3, 10**5):
    dp[i] = (dp[i-1] + dp[i-2]) % 1000000007

n, m = map(int, input().split())
start = 0
res = 1
for i in range(m):
    nex = int(input())
    if nex == start:
        res = 0
        break
    res = (res * dp[(nex-1)-start]) % 1000000007
    #print('res :', res)
    start = nex + 1
else:
    res = (res * dp[n - start]) % 1000000007
    #print('res :', res)
print(res)