A right rectangular prism has a total surface area of 2. Also, the sum of all the edges of the prism is 3. Find the length of the diagonal joining one corner of the prism to the opposite corner.