How is the reputation score in the friendship tournament calculated mathematically?