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

    println(sum)

}