Math calculus Rebalance a number in return always the total addition of the numbers to 100 for example even if we change a value

for a chance system i need calcul for make my systeme thanks !