z = gets.to_i
nums = gets.split.map(&:to_i)

ans = []
pre_num = nums[0]
nums.each_with_index do |i, j|
  if pre_num < i
    ans[j] = pre_num
  else
    ans[j] = i
  end
  pre_num = i
end
ans << nums[-1]
puts ans.inject(:+)
