n, m = map(int,input().split())
full = 1000000007
a = []
for _ in range(m):
    a += [int(input())]

b = []
start = 0
for x in a:
    b += [-start+x]
    start = x+1
b  += [-start+n+1]

def steps(N, cnt):
    if N == 2:
        cnt += 1
        return cnt
    if N ==1:
        cnt += 1
        return cnt
    if N > 2:
        cnt = steps(N-1,cnt)
        cnt = steps(N-2,cnt)
        return cnt

if 0 in b:
    print(0)

else:
    ans = 0
    for z in b:
        ans += steps(z, 0)

    print(ans%full)
    

