Equilibrium surface composition of ternary alloys