fun main(args:Array<String>) {
	val n = readLine()!!.toInt()
	val a1 = readLine()!!.split(" ").map{ it.toInt() }
	val a2 = readLine()!!.split(" ").map{ it.toInt() }
	
	(0..n-1).map{ a1.take(it+1).sum() + a2.drop(it).sum() }
			.max().let {println(it)}
	
}