How do you calculate the allocation of joint costs?