count = gets.chomp.to_i
numbers = gets.chomp.split
count.times do |i|
	numbers[i] = numbers[i].to_i
end
result = numbers[0] + numbers[count - 2]
(count - 1).times do |i|
	result += ([numbers[i], numbers[i + 1]]).min
end
puts result