      program answer
        implicit none
        integer :: i,N
        integer,allocatable,dimension(:) :: A,B
        integer :: ans
        intrinsic min
        read(*,*) N
        allocate(A(N),B(N-1))
        read(*,*) (B(i),i=1,N-1)
        A(1)=B(1)
        A(N)=B(N-1)
        ans=A(1)+A(N)
        do i=2,N-1
          A(i) = min(B(i-1),B(i))
          ans=ans+A(i)
        end do
        write(*,'(I0)') ans
        stop
      end program answer
