n = gets.to_i
num = gets.strip.split.map(&:to_i)
ary = Array.new(n,0)
ary[0] = num[0]
ary[n-1] = num[n-2]
i = 1
if n != 2
  while i < n-1 do
    ary[i] = [num[i-1],num[i]].min
    i += 1
  end
end
puts ary.sum