open System
open System.Collections.Generic;

let N =stdin.ReadLine()|>int
let B= stdin.ReadLine().Split()|> Array.map int
[<EntryPoint>]
let sf argv = 
    let fn i = if i=0 then B.[0] elif i=N-1 then B.[N-2] else min B.[i] B.[i-1]
    let mutable ans = 0
    for i in [0..N-1] do 
        ans <- ans + fn i
    printfn "%d" ans
    0
