N,W = input().split()
aArr = list()
ans = 0
tmp = int(N)
MOD = 10**9+7
for i in range(int(W)):
    inputInt = int(input())
    aArr.append(inputInt)
    if inputInt - tmp == 1:
        print(ans)
        exit()
    tmp = inputInt

tmp = 0
tmpB = 0
ans = 1
for i in range(int(N)):
    if(i in aArr):
        tmp = 0
    elif i < 2:
        tmp = 1
    else:
        tmp = ans
    ans = (tmp + tmpB) % MOD
    tmpB = tmp
print(ans)