object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val datN = readLine.split(" ").map(_.toInt).head
    val datA = readLine.split(" ").map(_.toLong).toList

    val ans = datA.sorted.reverse.slice(0, datN * 2).zipWithIndex.filter(_._2 % 2 == 1).map(_._1).sum

    println(ans)
  }
}
