a = []
b = []
n = gets.chomp.to_i
b = gets.chomp.split(" ").map(&:to_i)

bl = n-1

for i in 0...bl do
  if i ==0
    a[i]=a[i+1]=b[i]
  end

  if b[i]<a[i]
    a[i]=a[i+1]=b[i]
  else
    a[i+1]=b[i]
  end
end

puts a.sum