public class Euler770 {

    static double centralRatioAsymptotic(long n) {
        double nn = (double) n;
        double inv = 1.0 / nn;
        double corr = 1.0 - inv / 8.0 + (inv * inv) / 128.0 + (5.0 * inv * inv * inv) / 1024.0
                - (21.0 * inv * inv * inv * inv) / 32768.0;
        return corr / Math.sqrt(Math.PI * nn);
    }

    static long gFromThreshold(double threshold) {
        long approx = (long) Math.floor(1.0 / (Math.PI * threshold * threshold));

        if (approx < 100000L) {
            long n = 0;
            double r = 1.0;
            while (r > threshold) {
                n++;
                r *= (2.0 * n - 1.0) / (2.0 * n);
            }
            return n;
        }

        long n = Math.max(1L, approx);
        double r = centralRatioAsymptotic(n);

        while (n > 1 && r <= threshold) {
            r *= (2.0 * n) / (2.0 * n - 1.0);
            n--;
        }

        while (r > threshold) {
            n++;
            r *= (2.0 * n - 1.0) / (2.0 * n);
        }

        return n;
    }

    public static String solve() {
        double threshold = 1.0 / 19999.0;
        long ans = gFromThreshold(threshold);
        return Long.toString(ans);
    }

    public static void main(String[] args) {
        System.out.println(solve());
    }
}
