Move the pivot to the middle point of the goats: the seesaw balances there and that point is the mean. Learn the median too.