fun main(args : Array<String>) {
  val n = readLine()
  val b =  readLine()!!.split(" ").map{ it.toInt() }
  val a = Array(b.size + 1, {0})
  a[0] = b[0]
  for(i in 1 until b.size){
    a[i] = b[i - 1]
    if(b[i] < a[i]){
      a[i] = b[i]
    }
  }
  a[a.size-1] = b[b.size-1]
  var sum=0
  for(i in 0 until a.size){
    sum+=a[i]
  }
  println(sum)
}