public int solution(int[] array) {
		int count = 0;
		for (int p = 0; p < array.length; p++) {
			for (int q = p + 1; q < array.length; q++) {
				if (array[q] < array[p]) {
					count++;
					if (count > ONE_BILLION) {
						return -1;
					}
				}
			}
		}
		return count;
	}