n,m = map(int,input().split())
a = [0]*(n+2)
for _ in range(m):
    a[int(input())] = -1

if n == 1:
    print(1)
elif n == 2:
    if a[2] == -1:
        print(1)
    else:
        print(2)
else:
    if a[1] == -1:
        b1 = 0
    else:
        b1 = 1
    if a[2] == -1:
        b2 = 0
    else:
        b2 = b1+1

    b3 = b1 + b2

    for i in range(3,n+1):
        if a[i] == -1:
            b3 = 0
        else:
            b3 = b1+b2
        if b3 > 1000000007:
            b3 = b3 % 1000000007
        b1 = b2
        b2 = b3
        if b1==b2==0:
            break

    print(b3)