n = gets.to_i
b = gets.split(" ").map(&:to_i)

a = Array.new(n)
a.each.with_index do |_, i|
  if i == 0
    a[i] = b[i]
  elsif i < a.length - 1
    a[i] = [b[i], b[i-1]].min
  else
    a[i] = b[i-1]
  end
end

ans = 0
a.each do |i|
  ans += i
end
p ans