def main():
    n, m = map(int, input().split())
    As = [int(input()) for _ in range(m)]

    Steps = [0] * (n+1)
    Steps[0] = 1
    if 1 not in As:
        Steps[1] = 1

    for i in range(2, n+1):
        if i in As:
            continue
        Steps[i] = Steps[i-1] + Steps[i-2]
    ans = Steps[-1] % (10**9+7)
    print(ans)


if __name__ == "__main__":
    main()
