n, m = map(int, input().split())
a = [-1]
for i in range(m):
    a.append(int(input()))
a.append(n+1)

stairs = [0, 1, 1]
for i in range(3, n+1):
    stairs.append(stairs[i-1] + stairs[i-2])

mod = 10 ** 9 + 7
count = 1
for i in range(m+1):
    diff = a[i+1] - a[i] - 1
    count *= stairs[diff]
print(count % mod)
