object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val B = List.fill(sc.nextInt() - 1)(sc.nextInt())
  val (_, sum) =
    (B :+ B.last).foldLeft(B.head -> 0) { case ((b, sum), i) => (i, sum + b.min(i)) }
  println(sum)
}
