def calculate(n, bindexes):
    arr = []
    for i in range(n):
        if bindexes.__contains__(i):
            arr.append(0)
            continue

        if i == 0:
            arr.append(1)
        elif i == 1:
            arr.append(arr[i-1] + 1)
        else:
            arr.append(arr[i-1] + arr[i-2])
    return arr

S = input().split(" ")

n = int(S[0])
m = int(S[1])
brokenStairIndexes = []

for i in range(m):
    brokenStairIndexes.append(int(input())-1)

arr = calculate(n,brokenStairIndexes)

print(arr[n-1] % 1000000007)