n=gets.to_i
input = gets.chomp.split(" ").map(&:to_i)
answer=[]
n.times do |count|
  if count==0
    answer<<input[count]
  elsif count==n-1
    answer<<input[count-1]
  else  
    answer<<[input[count],input[count-1]].min
  end  
end  
puts answer.inject(:+)