

fun main(arr:Array<String>) {
    val itemCount = readLine()!!.toInt()
    val aList = readLine()!!.split(" ").map{it.toInt()}
    val bList = mutableListOf<Int>()
    if(aList.size >= 2) {
        for(i in (1 until aList.size)) {
            bList.add(Math.min(aList[i-1], aList[i]))
        }
    }
    bList.add(0, aList.first())
    bList.add(aList.last())
    val ans = bList.sum()
    println(ans)
}


