program answer
  implicit none

  integer :: N, i, j
  integer, allocatable :: B(:), C(:),sum(:)

  read(*,*) N
  allocate(B(N))
  allocate(C(N))
  allocate(sum(N))
  read(*,*) B
  read(*,*) C

  sum=0
  do i = 1, N
     do j = 1, i
        sum(i)=sum(i)+b(j)
     end do
     do j = i, N
	sum(i)=sum(i)+c(j)
     end do
  end do
  write(*,*) maxval(sum)

  deallocate(B)
  deallocate(C)
  deallocate(sum)
  stop
 end program answer
