n, m = map(int,input().split())
hole = [int(input()) for _ in range(m)]

p =  [0] * n

for i in range(n):
    if i + 1 in hole:
        p[i] = 0
    else:
        if i == 0:
            p[0] = 1
        elif i == 1:
            p[1] = p[0] + 1
        else:
            p[i] = p[i-1] + p[i-2]

print(p[n-1] % (10 ** 9 + 7))