public int solution(int[] array) {
		if (array.length < 2) {
			return array.length;
		}

		Set<Integer> heightsSet = new HashSet<Integer>();
		for (int i : array) {
			heightsSet.add(i);
		}
		Integer[] heights = heightsSet.toArray(new Integer[heightsSet.size()]);
		Arrays.sort(heights);


		int count = 0;
		for (int i = 1; i < array.length; i++) {
			if (array[i] != array[i - 1]) {
				count++;
			}
		}
		return count;
	}