Three-body unitarity in the finite volume