program test

implicit none
integer :: i,j
integer :: n, a(2,100)=0, amax=0 

read(*,*) n
do i = 1,2
 read(*,*) (a(i,j),j=1,n)
enddo

do i =1, n
  amax = max(amax, sum(a(1,1:i))+sum(a(2,i:n)))
enddo

write(*,*) amax

end program