def kaidan(n):
    global memo
    if memo[n]==0:
        if n == 1 or n == 0:
            memo[n] = 1
        else:
            memo[n] = kaidan(n-1)+kaidan(n-2)
    return memo[n]%1000000007

memo = [0] * (10**5 + 1)

n,m = map(int,input().split())
start = 0
ans = 1
for i in range(m):
    a = int(input())
    if start == a:
        ans = 0
        break
    else:
        ans = (ans * kaidan((a-1)-start))%1000000007
        start = a + 1
ans = ans * kaidan(n-start)
print(ans%1000000007)
