def resolve():
    n,m= map(int,input().split())
    a = [int(input()) for _ in range(m)]
    d = [0]*(n+1)
    d[0] = 0
    d[1] = 1
    d[2] = 2
    for i in range(3,n+1):
        if not i in a :
            d[i] += d[i-1] + d[i-2]
    print(d[i]%1000000007)
resolve()
