#include <iostream>
#include <cmath>
using namespace std;
class SortEstimate
{
public:
	
	double howMany(int c, int time){

    long double x = 7; 
    long double r = double(time)/double(c); 
    for (int i = 0; i<1000; i++) { 
      x = x - (x * log(x)/log(2.0) - r)/(1.0 + log(x)/log(2.0)); 
    } 
    return x; 
     
  } 
};

int main()
{
	SortEstimate sort;
	cout<<sort.howMany(1,8)<<endl;//4
	cout<<sort.howMany(2,16)<<endl;//4
	cout<<sort.howMany(37,12392342)<<endl;//23105
	cout<<sort.howMany(1,2000000000)<<endl;//7.6375e+07
	
	return 0;
}