Exercise 4: Median