n, m = map(int, input().split())

breakstep = []

for _ in range(m):
    breakstep.append(int(input()))

sl = [-1 for _ in range(n+1)]
def solve(i):
    if sl[i] == -1:
        if i in breakstep:
            sl[i] = 0
        elif i in [0, 1]:
            sl[i] = 1
        else:
            sl[i] = (solve(i-1) + solve(i-2)) % 1000000007
    return sl[i]

print(solve(n))