function myin(){return require("fs").readFileSync("/dev/stdin", "utf8").trim();}
function myout(text){console.log(text);}//standard output
//[no]param
//0:noConvert	1:singleNum	2:spaceList	3:newLineList	4:spaceNumList	5:newLineNumList
function myconv(i,no){switch(no){case 0:return i;case 1:return parseInt(i);case 2:return i.split(" ");case 3:return i.split("\n");case 4:return i.split(" ").map((a)=>Number(a));case 5:return i.split("\n").map((a)=>Number(a));}}

function Main(input) {
  input = myconv(input,3);
  var N = myconv(input[0],1);
  var list1 = myconv(input[1],4);
  var list2 = myconv(input[2],4);
  var output = 0;
  
  var list3 = [];
  var list4 = [];
  
  for(var i = 0; i < N; i++){
    if(i == 0){
    	list3.push(list1[0]);
  	}else{
      	list3.push(list3[i-1] + list1[i]);
    }
  }
  for(var i = 0; i < N; i++){
    if(i == 0){
    	list4.push(list2[N - 1]);
  	}else{
      	list4.push(list4[i-1] + list2[N - (i + 1)]);
    }
  }
  list4.sort(function(a,b){
  	return b - a;
  });
  //myout(list3);
  //myout(list4);
  for(var i = 0; i < N; i++){
    output = Math.max(output,list3[i] + list4[i]);
  }
  myout(output);
}

Main(myin());