N,M=map(int,input().split())
A=[int(input()) for i in range(M)]
m=10**9+7
b=0
def DP():

                    
    a=1
    b=0

    def f(n):
        
        nonlocal a,b
        if n==0:

            if a>=b:
                
                b=0

            else:
                a=0

        if n % 2 == 1:

            b=a+b
        elif n % 2 == 0:

            a=a+b

        return max(a,b)

    return f

dp=DP()

for i in range(1,N+1):
    if (i in A) and (i+1 in  A):
        print(0)
        exit()
    if i in A:
        x=dp(0)
        continue
    else:
        x=dp(i)

print( x % m )