#include<iostream>
#include<cstdio>
#include<cstring>
#include<map>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<queue>
using namespace std;
typedef long long ll;
const int SIZE = 100010;
int dp[3][110];
int num[3][110];

int main()
{
	int n;
	cin>>n;
	for(int i = 1;i <= n;i ++)	cin>>num[1][i];
	for(int i = 1;i <= n;i ++)	cin>>num[2][i];
	for(int i = 1;i <= n;i ++)
	{
		dp[1][i] = dp[1][i-1] + num[1][i];
		dp[2][i] = max(dp[1][i],dp[2][i-1]) + num[2][i];
	}
	cout<<dp[2][n]; 
	return 0;
}
