# coding=utf-8

if __name__ == '__main__':

    N, M = map(int, input().split())
    a = [int(input()) for i in range(M)]

    dp = [0] * (N + 2)
    mod = 1000000007

    dp[N] = 1

    for i in range(N + 1):
        if (i == 0):
            continue
        i = N - i

        #print('i = ',i)

        if(i not in a):
            dp[i] += ((dp[i + 1] % mod) + dp[i + 2]) % mod
            #print(dp[i])

    #print(a)
    print(dp[0])