example : calculating the number of rights