public static final int task7(int nthPrime) {
        int prime = 2;  
        int number = 3;  
        while  (prime < nthPrime) {  
            number += 2;  
            if (isPrime(number)) {
                prime++;
            } 
        }  
        return number;
    }