public void Solve() {
        long[] phiNumerators = new long[_max + 1];
        long[] phiDenomitors = new long[_max + 1];
        for (int i = 0; i < phiDenomitors.length; i++) {
            phiNumerators[i] = i;
            phiDenomitors[i] = 1;
        }

        for (int i = 2; i < phiNumerators.length; i++) {
            if (phiNumerators[i] == i && phiDenomitors[i] == 1) {
                for (int j = i; j < phiNumerators.length; j += i) {
                    phiNumerators[j] *= i - 1;
                    phiDenomitors[j] *= i;
                }
            }
        }

        long sum = 0;
        for (int i = 2; i < phiDenomitors.length; i++) {
            sum += phiNumerators[i] / phiDenomitors[i];
        }

        System.out.println("Result=" + sum);
    }