public int getSolution() throws Exception {
        // calculate primes in 5 levels
        // from level 2 up check the concatenation of the previous levels
        for (long p1 = 3; p1 < MAX_PRIME; p1 = _primes.generatePrime(p1)) {
            for (long p2 = _primes.generatePrime(p1); p2 < MAX_PRIME; p2 = _primes.generatePrime(p2)) {
                // only if the concatenation is successful go to the next level
                if (isConcatable(new long[]{p1, p2})) {
                    for (long p3 = _primes.generatePrime(p2); p3 < MAX_PRIME; p3 = _primes.generatePrime(p3)) {
                        if (isConcatable(new long[]{p1, p2, p3}, 2)) {
                            for (long p4 = _primes.generatePrime(p3); p4 < MAX_PRIME; p4 = _primes.generatePrime(p4)) {
                                if (isConcatable(new long[]{p1, p2, p3, p4}, 3)) {
                                    for (long p5 = _primes.generatePrime(p4); p5 < MAX_PRIME; p5 = _primes.generatePrime(p5)) {
                                        if (isConcatable(new long[]{p1, p2, p3, p4, p5}, 4)) {
                                            // if all primes are concatable return the sum of the primes
                                            return sumOf(new long[]{p1, p2, p3, p4, p5});
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        throw new Exception("");
    }