def main():
    MOD = 1_000_000_007
    N, M = map(int, input().split())
    a = [int(input()) for _ in range(M)]
    table = [1]*(N+1)
    for broken in a:
        table[broken] = 0
    table[1] = table[0] * table[1]
    for n in range(2, N+1):
        table[n] = ((table[n-2] + table[n-1]) * table[n]) % MOD
    print(table[-1])
main()