You list all the numbers in the set. If some are duplicates, you pay no attention to that fact. Just apply the rule(s) for finding the median.

__Examples__1, 2, 2, 2,__3__, 4, 5, 9, 12 has a median of 3 1, 2,__2, 2__, 3, 4 has a median of (2+2)/2 = 2