N,M = map( int, input().split() )
break_list = []
for i in range(M):
    break_list.append( int( input() ) )
k = 1    
fib = [0] * (N + 1)
if 1 in break_list:
    fib[1] = 0
else:
    fib[1] = 1
    
if 0 in break_list:
    k = -1
    
fib[0] = 1
for i in range(N - 1):
    if i + 2 in break_list:
        fib[i + 2] = 0
    else:
        fib[i + 2] = fib[i] + fib[i + 1]
    
if k > -1:
    print( fib[i+2] %  1000000007 )

else:
    print(0)