public class Main {
public static void main(String[] args) {
int n = 23333333;
for (int i = 0; i <= n; i++) {
double x = (-1.0) * i / n * log2(1.0 * i / n, 2) * i;
double y = (-1.0) * (n - i) / n * log2(1.0 * (n - i) / n, 2) * (n - i);
if (x + y >= 11625907.5798) {
System.out.println(i);
return;
}
}
}
//如何计算logx(y)=ln(y)/ln(x); Math.log(x) = In(x)
public static double log2(double x, double base) {
return Math.log(x) / Math.log(base);
}
}