MAX = 1000000007

def solve():
    N, M = [int(_) for _ in raw_input().split()]
    a = [None] * M
    for i in range(M):
        a[i] = int(raw_input())
    ok = [1] * (N+1)
    for i in range(M):
        ok[a[i]] = 0
    ret = [1] * (N+1)
    ret[N-1] = ok[N-1]
    for i in range (N-2,-1,-1):
        ret[i] = (ret[i+1] * ok[i+1] + ret[i+2] * ok[i+2]) % MAX
    print ret[0]

if __name__ == '__main__':
    solve()
