n,m = map(int,input().split())
mat = [0 for i in range(n+1)]

for i in range(m):
    mat[int(input())] = -1

for i in range(n):
    if i == 0:
        mat[i] = 1
    if mat[i] == -1:
        continue
    if i + 1 < n+1:
        if mat[i+1] != -1:
            mat[i+1] += mat[i]
    if i + 2 < n+1:
        if mat[i+2] != -1:
            mat[i+2] += mat[i]
if mat[-1] => 0:
    print(mat[-1]%1000000007)
else:
    print(0)
 