"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const B = arg[1].split(" ").map(n=>parseInt(n));
    
    let answer = [];
    
    answer[0] = B[0];
    answer[1] = B[0];
    
    for(let i=1; i<N-1; i++) {
        if(answer[i] > B[i]) {
            answer[i] = B[i];
        }
        
        answer[i + 1] = B[i];
    }
    
    console.log(answer.reduce((m,n)=>m+n));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
