BASE =  1000000007

class Route(object):
    def __init__(self):
        self.counter = [1]

    def getCounter(self, idx):
        if idx == -1:
            return 0
        try:
            return self.counter[idx]
        except IndexError:
            return 0

    def getList(self):
        return self.counter

    def append(self, elem):
        self.counter.append(elem)

if __name__ == '__main__':
    N, M = [int(i) for i in input().split()]
    not_available = []
    for i in range(M):
        not_available.append(int(input()))
    route_counter = Route()
    for idx in range(1, N + 1):
        if idx in not_available:
            route_counter.append(0)
            continue
        route_counter.append(route_counter.getCounter(idx - 1) + route_counter.getCounter(idx - 2))
    print(route_counter.getCounter(N) % BASE)