Suppose that a right circular cylinder of radius r and height h is inscribed in a right circular cone of radius R and height H. Find the value of r (in terms of R and H) that maximizes the total surface area of the cylinder (including top and bottom). [Note: The solution depends on whether H ≤ 2R or H > 2R. We may allow a cylinder to have radius 0 or height 0.]