program main
	integer N, i, j, ans
	integer, allocatable :: A(:, :), S(:, :)
	read(*, *) N
	allocate(A(1:2, 1:N))
	allocate(S(1:2, 0:N))
	read(*, *) A(1, 1:N)
	read(*, *) A(2, 1:N)
	S(1:2, 0) = 0
	do i = 1, N
		do j = 1, 2
			S(j, i) = S(j, i-1) + A(j, i)
		end do
	end do
	ans = 0
	do i = 1, N
		ans = max(S(1, i) + (S(2, N) - S(2, i-1)), ans)
	end do
	write(*, *) ans
end program main