inputs = list(map(int, input().split()))
N, M = inputs
a = [int(input()) for i in range(M)]
pattern = 0


def stairs(n):
    global pattern
    if n < N:
        if n + 1 not in a:
            if n + 1 == N:
                pattern += 1
            else:
                stairs(n + 1)
        if n + 2 not in a:
            if n + 2 == N:
                pattern += 1
            elif n >= N:
                pass
            else:
                stairs(n + 2)


stairs(0)
pattern = pattern % 1000000007
print(pattern)