a = input().split()
a = [int(i) for i in a]

broken_stairs = []
kekka_flag = False


def fib(x, broken_stairs):
    count = [1, 2]
    if 1 in broken_stairs:
        count[0] = 0
        count[1] = 1
    if 2 in broken_stairs:
        count[1] = 0
    
    for i in range(x - 2):
        if i + 3 in broken_stairs:
            count.append(0)
        else:
            count.append((count[i] + count[i + 1]) % 1000000007)
    return count


for i in range(a[1]):
    broken_stairs.append(int(input()))

count = fib(a[0], broken_stairs)
if a[0] == 1:
    print(count[0])
else:
    print(count[-1] % 1000000007)