// C - Candies
#include <bits/stdc++.h>
using namespace std;
#define rp(i,s,e) for(int i=(s);i<(e);++i)
int in(){int x;scanf("%d",&x);return x;}

int main(){
	int N=in();
	int A[N+1],B[N+1],ans=0; A[0]=0, B[0]=0;
	rp(i, 1, N+1) A[i]=in()+A[i-1];
	rp(i, 1, N+1) B[i]=in()+B[i-1];
	rp(i, 1, N+1) ans = max(ans, A[i]+B[N]-B[i-1]);
	printf("%d\n",ans);
}