attrs = Array.new
while line = $stdin.gets
    attrs << line.chomp.split.map{|v| v.to_i }
end

N = attrs.shift[0]
B = attrs.shift

if N == 2 then
  puts B[0] * 2
else
  result = B[0] + B[-1]
  for i in 1..(N - 2) do
    result += B[i] if B[i] < B[i - 1]
    result += B[i - 1] if B[i] >= B[i - 1]
  end
  puts result 
end