a, b = map(int, input().split())
c = [int(input())for _ in range(b)]
d = [0] * (a+1)
d[0] = 1 if 0 not in c else 0
d[1] = 1 if 1 not in c else 0
for i in range(2, a+1):
    if i not in c:
        d[i] = (d[i-1] + d[i-2]) % 1000000007
    else:
        d[i] = 0
print(d[len(d)-1])
