object Main extends App {
  var b = readInt
  var a = readLine.split(" ").map(_.toLong).sorted.reverse
  var sum = 0L
  for(i <- 1 until b * 3 if((i>=b)&&(i<=b*2-1))) {
      sum = sum + a(i)
  }
  print(sum)
}