I have a problem makeing 3 sliders controlling one value

i have an idea that player should control his health stamina and mana via sliders that always sums to predefined value for example: player have 300 points of stats, sets HP to 298 so stamina and mana automatically sets to 1. Then he sets stamina to 50 so HP goes to 248 then sets Mana to 50 so Stamina goes to 25 and health goes to 223. I am strugling to do that i menaged to do such system with 2 sliders but adding third one is too hard for me. Or maybe instead of 3 separate sliders it is possible to use one slider with 2 handles and then 3 separated zones of this slider to determine stats values but i dont know how to do this either.