Let $ABCDEFGH$ be right rectangular prism. The total surface area of the prism $1.$ Also, the sum of all the edges of the prism is $2.$ Find the length of the diagonal joining one corner of the prism to the opposite corner.