n = gets.chomp.to_i
b = gets.chomp.split.map(&:to_i)

ans_arr = []
n.times do |i|
    if i == 0 
        ans_arr.push(b[0])
        next
    elsif i == n-1
        ans_arr.push(b[i-1])
        break
    end
    if b[i-1] < b[i]
        ans_arr.push(b[i-1])
    else
        ans_arr.push(b[i])
    end
end
p ans_arr.inject(:+)