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

a, b = 0, 0

for i in range(n):
    if i + 1 in hole:
        a, b = 0, a
    else:
        if i == 0:
            a = 1
        elif i == 1:
            a, b = a + 1, a
        else:
            a, b = a + b, a
    

print(a % (10 ** 9 + 7))