implicit none
integer :: N
integer, allocatable :: A(:,:)
integer :: i
integer, allocatable :: u(:), l(:)
integer :: su, sl, smax

read *, N
allocate(A(N,2))
read *, (A(i,1), i=1,N)
read *, (A(i,2), i=1,N)

allocate(u(N))
allocate(l(N))

su = 0
sl = 0
do i = 1, N
   su = su + A(i,1)
   sl = sl + A(N-i+1,2)
   u(i) = su
   l(N-i+1) = sl
enddo

smax = 0
do i = 1, N
   su = u(i) + l(i)
   if (su > smax) then
      smax = su
   endif
enddo

write(6,'(i0)') smax
stop
end