MOD = 1000000007


def main():
    n, m = map(int, input().split())
    aa = set(int(input()) for _ in range(m))
    ss = [0 for _ in range(n + 1)]
    ss[0] = 1
    if not 1 in aa:
        ss[1] = 1
    for i in range(1, n + 1):
        if i in aa:
            continue
        ss[i] = (ss[i - 1] + ss[i - 2]) % MOD
    print(ss[n])


if __name__ == "__main__":
    main()
