n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 1000000007
if 1 not in a  and 2 not in a:
    c = [1,2]
elif 1 in a and 2 not in a:
    c = [0,1]
elif 1 not in a and 2 in a:
    c = [1,0]
else:
    c = [0,0]

for i in range(2,n):
    if i+1 in a:
        c.append(0)
    else:
        c.append((c[i-2] + c[i-1])%mod)

print(c[len(c)-1])