


object Main extends App {

  val n = scala.io.StdIn.readInt()
  val b = scala.io.StdIn.readLine.split(" ").map(_.toInt)

  def solve(): Int = {
    val a = Array.fill(n)(0)
    for(i <- 0 until n) {
      if(i == 0) a(i) = b(i)
      else if(i < n-1) {
        a(i) = Math.min(b(i), b(i-1))
      } else {
        a(i) = b(i-1)
      }
    }
    a.sum
  }
  println(solve)
}
