program main

  integer :: N, add

  integer, allocatable, dimension ( : ) :: A, B

  read ( *, * ) N

  allocate ( A ( 1:N-1 ) )

  allocate ( B ( 1:N ) )

  read ( *, * ) A ( 1:N-1 )

  B ( : ) = 0

  B ( 1 ) = A ( 1 )

  B ( N ) = A ( N - 1 )
  
  do i = 2, N - 1

     B ( i ) = min ( A ( i - 1 ), A ( i ) )
     
  end do
  
  print '(i0)', sum ( B ( 1:N ) )

end program main
