def cc
    n = gets.chomp.to_i
    bn = gets.chomp.split(/\s/).map{|x| x.to_i}

    an = [bn[0]]
    for i in 1..(n-2)
        l = bn[i-1]
        r = bn[i]
        an.push([l, r].min)
    end
    an.push(bn[-1])

    puts an.inject(0){|sum,x| sum + x }
end

cc

