def selector(flag):
    if flag:
        return 0
    else:
        return 1

def func(x, a, n):
    if not a[n]:
        x[n] = selector(a[n-1]) * x[n-1] + selector(a[n-2]) * x[n-2]
    else:
        x[n] = 0

K = 1000000007
line = input().split(' ')
N = int(line[0])
M = int(line[1])
a = [False] * (N + 1)
x = [0] * (N + 1)

for i in range(M):
    hole = int(input())
    a[hole] = True

x[0] = 1
if a[1]:
    x[1] = 1
else:
    x[1] = 0

for i in range(2, N+1):
    func(x, a, i)
    
print(x[N]%K)