n, m = map(int,input().split())

b = [0]*(n+2)
b[0] = 1

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

for i in range(m):
    if b[i] != -1:
        if b[i+1] != -1:
            b[i+1] += b[i]
        if b[i+2] != -1:
            b[i+2] += b[i]
        b[i] %= 1000000007

print(b[n] % 1000000007)
