#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

    template<
             typename Double,
             typename Func,
             typename = std::enable_if_t<std::is_floating_point<Double>::value>
             >
Double binEq(Double left, Double right, Double eps, Func f)
{
    using std::swap;
    Double x = left;
    if (left > right)
    {
        swap(left,right);
    }
    Double fl = f(left), fr = f(right);
    if (fl*fr > 0) throw runtime_error("Wrong range");

    while ( right - left > eps )
    {
        x = (left + right)/Double(2.0);

        (fl * f(x) < 0 ? right : left) = x;
    }

    return x;
}

class Progress
{
    double sum, b1;
    int n;
public:
    double operator()(double q) { return sum*(q-1) - b1*(pow(q,n)-1); }
    Progress(double sum, double b1, int n):sum(sum),b1(b1),n(n){}
};

int main()
{
    cout << setprecision(12) << binEq(1.001,10.0,1e-13,Progress(210,10,10)) << endl;
}
