Implement multi-part cost calculator | Stripe Interview Question