N, M = map(int, input().split())

DP = [-1 for i in range(N+1)]
stair = [0 for i in range(N+1)]
DP[0] = DP[1] = 1
stair[0] = stair[1] = 1
MOD = 10**9 + 7

for i in range(M):
    index = int(input())
    stair[index] = 0
    DP[index] = 0

def DP_top_down(num):

    if (DP[num] == 0): # broken
        return(0)

    elif (DP[num] == 1): # done
        answer = stair[num]
    
    else:
        answer = DP_top_down(num-2) + DP_top_down(num-1)
        stair[num] = answer # I forgot this operation!
        DP[num] = 1        

    return(answer)

answer = DP_top_down(N)
print(answer%MOD)