import sys
MOD = 10**9 + 7
n, m = map(int, input().split())
a = [int(x) for x in sys.stdin.readlines()]
p1, p2 = 0, 0
if 1 not in a:
    p1, p2 = 0, 1
if 2 not in a and n >=2:
    p1, p2 = p2, p2 + 1

for i in range(2, n):
    if i+1 not in a:
        p1, p2 = p2, (p2 + p1)%MOD
    else:
        p1, p2 = p2, 0
print(p2)