The best way is to work out a system where you figure out the number of shares and their worth so then you share among the partners. Every share is not just the profit gotten but also among the losses.