import io.StdIn._
object Main extends App {
  val n = readInt
  val b = readLine.split(" ").map(_.toLong).toList

  val t = if(n > 2 ) {
      b.sliding(2)
        .foldLeft(0L)((a, b) => math.min(b(0), b(1)) + a)
    } else 0
  val res = b.head + t + b.last
  println(res)
}
