public long process() {
        _m[0] = _a;
        increase(_m[0]);
        for (int i = 1; i < _k; i++) {
            _m[i] = (_b * _m[i - 1] + _c) % _r;
            increase(_m[i]);
        }
        _m[_k] = Long.MAX_VALUE;
        long prev = 0;
        NavigableSet<Long> keySet = _treeMap.navigableKeySet();
        for (long key : keySet) {
            if (key > prev) {
                _navigableSet.add(new Entry(prev, key - 1));
            }
            prev = key + 1;
        }
        _navigableSet.add(new Entry(prev, Long.MAX_VALUE));
        long z = _n - _k;
        long m = findZth(z, _k);
        if (m > 0)
            return m;

        z = (z + 1) % (_k + 1);
        if (z == 0) {
            z += _k + 1;
        }
        return findZth(z, _k + 1);
    }