program maximal_value
  implicit none
  integer :: n, b(100) = 0, a(100) = 0, ans, i
  read(*,*) n
  read(*,*) b(1:n-1)
  a(1) = b(1)
  a(n) = b(n-1)
  do i = 2, n-1
    a(i) = min(b(i-1),b(i))
  end do
  write(*,'(i0)') sum(a(1:n))
end program maximal_value