n = gets.to_i
ar = gets.chomp.split(' ')
result = []
a=0

for i in 0..(n-1) do
  if i == 0
      result.push(ar[0].to_i)
  elsif i == (n-1)
    result.push(ar[i-1].to_i)
  else
    if ar[i-1].to_i > ar[i].to_i
        result.push(ar[i].to_i)
    else
        result.push(ar[i-1].to_i)
    end
  end
end
 
result.each do |k|
  a += k
end
puts a
