local n = io.read("*n")
local sum = io.read("*n")
local prv = sum
local mmi = math.min
for i = 2, n - 1 do
  local nxt = io.read("*n")
  sum = sum + mmi(prv, nxt)
  prv = nxt
end
sum = sum + prv
print(sum)
