How to calculate the value of selected checboxes