The optimal survival strategy in an egalitarian community