Two circles of radius $R$ and $r$, with $R>r$, are tangent to each other externally. The sides adjacent to the base of an isosceles triangle are common tangents to these circles. The base of the triangle is tangent to the circle of the greater radius. Determine the length of the base of the triangle.