For a set of numbers (e.g. {1, 2, 2, 2, 3, 4, 1, 5, 1, 6}) the degree of the set is the largest number of occurences of the same element. In the given example the degree is 3 as both element 1 and element 2 occur 3 times each.

Given a set of numbers, return the length of the smallest subset that has the same degree as the original set. For the given example, the two subsets with the same degree as the original set are {1, 2, 2, 2, 3, 4, 1, 5, 1} and {2, 2, 2}. The first subset is 9 elements long and the second one is 3 elements long, so the program should return 3.