n, m = map(int, input().split())
bad = [int(input()) for _ in range(m)]
back2 = 0
back1 = 1
MOD = int(1e9+7)

for i in range(n):
    if i + 1 in bad:
        back2, back1 = back1, 0
    else:
        back2, back1 = back1, back2+back1

print(back1%MOD)