A large-scale experiment demonstrates sex differences in cooperation and competition that can explain group size variation in ostriches.