N = gets.chomp.to_i
B = gets.chomp.split.map(&:to_i)
A = Array.new(N)
if N == 2
  puts B[0] * 2
  exit
end
if B[0] > B[1]
  A[0] = B[0]
  A[1] = B[1]
elsif B[0] <= B[1]
  A[0] = A[1] = B[0]
end
(2..B.length-1).each do |i|
  A[i] = [B[i-1], B[i]].min
end
A[-1] = B[-1]
puts A.inject(:+)
