program main
    implicit none
    integer:: n, i
    integer, allocatable:: a(:), b(:)
    integer:: sum_

    read*, n
    sum_ = 0
    allocate(a(n), b(n-1))
    read*, b(1: n-1)

    do i = 1, n-2
        sum_ = sum_ + minval(b(i: i+1))
        
    end do
    print*, sum_ + b(n-1) + b(1)

end program