let n = Scanf.scanf " %d" (+) 0
let bs = Array.init (n - 1) @@ fun _ -> Scanf.scanf " %d" (+) 0
let ans = ref @@ bs.(0) + bs.(n - 2)
let _ = for i = 1 to n - 2 do ans := !ans + min bs.(i - 1) bs.(i) done; Printf.printf "%d\n" !ans