num = gets.to_i
b = gets.split(" ").map(&:to_i)
result = Array.new(num)

(num - 1).times do |i|
  if i == 0
    result[i] = b[i]
    result[i + 1] = b[i]
  else
    result[i + 1] = b[i]
    result[i] = b[i] if result[i] > b[i]
  end
end

puts result.sum