Solve CostOfDancing