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

breakstep = []

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

sl = [1]
def solve(i):
    global sl
    l = len(sl)
    if l < i+1:
        while l < i+1:
            if l in breakstep: 
                sl.append(0)
                l += 1
                continue
            elif l == 1:
                l += 1
                sl.append(1)
            sl.append(sl[l-1] + sl[l-2])
            l += 1
    return sl[i]
print(solve(n)%1000000007)