import scala.math.min

object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val b = Array.fill(n-1)(sc.nextInt()).reverse
  val initDigit = 100000
  val ret = b.foldLeft((initDigit, 0))((x, y) => (min(x._1, y), x._2 + min(x._1, y)))
  println(ret._2 + min(ret._1, b.last))
}