class Primes {

    public final int compute() {
        long start = System.currentTimeMillis();
        int cnt = 0;
        int prntCnt = 97;
        int res;
        for (;;) {
            res = next();
            cnt += 1;
            if (cnt % prntCnt == 0) {
                log("Computed " + cnt + " primes in " + (System.currentTimeMillis() - start) + " ms. Last one is " + res);
                prntCnt *= 2;
            }
            if (cnt >= 100000) {
                break;
            }
        }
        return res;
    }

    protected  Primes();

}