N = gets.to_i
B = gets.split(" ").map(&:to_i)

ans = Array.new(N)

B.each.with_index do |b, i|
  ans[i] = b if i == 0

  if i + 1 < B.size
    ans[i + 1] = [b, B[i + 1]].min
  else
    ans[i + 1] = b
  end
end

puts ans.inject(:+)
