def stairs(n,a):
    var1 = 1
    var2 = 1
    tmp = 1
    if 1 in a:
        var2 = 0
    for i in range(1,n):
        if i+1 in a:
            tmp = 0
            var1 = var2
            var2 = tmp
        else:    
            tmp = var1 + var2
            var1 = var2
            var2 = tmp
    return tmp

N,M = map(int,input().split())
A = []
for i in range(M):
    A.append(int(input()))
             
a = stairs(N,A)
print(a%1000000007)