fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val B = readLine()!!.split(" ").map { it.toInt() }


    val A = IntArray(N)
    A[N - 1] = B[N - 2]
    (N-2 downTo 1).forEach {
        A[it] = Math.min(B[it - 1], B[it])
    }
    A[0] = B[0]

    println(A.sum())
}