int intMax(int R[]) {
        int RMax = Integer.MIN_VALUE;
        for (int i = 0; i < R.length; i++) {
            if (RMax < R[i]) {
                RMax = R[i];
            }
        }
        return RMax;
    }