Maximum stocks in a pie