4 Sliders to Represent 100%

Ok, I have 4 Sliders that I want to represent 100% of a total Number;

Say the number is 100 and you start all the sliders off at 25. Each Slider has a Min of 0 and a Max of 100, to represent 0 to 100 percent of the Total number.

So if one slider is all the way to 100% the rest of the 3 are at 0%;

Example: All Sliders are set to 25, and you slide the top slider to the right (increasing) say to 40%; The Sliders should say 40%, 20%,20%, and 20% since it would decrease the rest of the sliders accordingly, so they all add up to 100%;

I’ve been trying to crack the math, but without any luck. I have a feeling that this should be fairly simple, but that just adds to the frustration…

Any ideas?