local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, string.sub(k, i, i)) end local r = io.read local u = table.unpack return function() return r(u(a)) end end})
local N = read.n()
local B = {}
for i=1,N-1 do B[i] = read.n() end

local AN = B[N-1]
local ans = AN
local next = AN
for i=N-1,2,-1 do
    local Ai = math.min(B[i-1], next)
    ans = ans + Ai
    next = Ai
end
local A1 = B[1]
ans = ans + A1
print(ans)