to calculate some numbers based on parties