Implement Equilibrium Index problem.