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