n,m = map(int, input().split())
a = [int(input())for i in range(0,m)]
div = 1000000007
pat = [1,1]
for i in range(2,n+1):
    pat.append(pat[i-2]+pat[i-1])
ans = pat[a[0]-1]
for i in range(1,m):
    ans *= pat[a[i] - a[i-1] -2]
ans *= pat[n- a[-1]-1]
print(ans%div)