import java.util.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	}
} import java.util.*; util.* java import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	}
} Main public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) int n = parseInt(sc.next()); n parseInt(sc.next()) parseInt sc.next() sc.next sc long[] a1 = new long[n]; a1 new long[n] n long[] a2 = new long[n]; a2 new long[n] n for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			a1[i] = parseLong(sc.next());
		} {
			a1[i] = parseLong(sc.next());
		} a1[i] = parseLong(sc.next()) a1[i] a1 i parseLong(sc.next()) parseLong sc.next() sc.next sc for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			a2[i] = parseLong(sc.next());
		} {
			a2[i] = parseLong(sc.next());
		} a2[i] = parseLong(sc.next()) a2[i] a2 i parseLong(sc.next()) parseLong sc.next() sc.next sc sc.close() sc.close sc long[] b1 = new long[n]; b1 new long[n] n long[] b2 = new long[n]; b2 new long[n] n b1[0] = a1[0] b1[0] b1 0 a1[0] a1 0 b2[n-1] = a2[n-1] b2[n-1] b2 n-1 n 1 a2[n-1] a2 n-1 n 1 for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		} i=1; i=1 i 1 i<n i n i++ i++ i {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		} {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		} b1[i] = a1[i]+b1[i-1] b1[i] b1 i a1[i]+b1[i-1] a1[i] a1 i b1[i-1] b1 i-1 i 1 b2[n-1-i] = a2[n-1-i]+b2[n-i] b2[n-1-i] b2 n-1-i n-1-i n 1 i a2[n-1-i]+b2[n-i] a2[n-1-i] a2 n-1-i n-1-i n 1 i b2[n-i] b2 n-i n i long mx=0; mx 0 long b12=0; b12 0 for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		} {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		} b12 = b1[i] + b2[i] b12 b1[i] + b2[i] b1[i] b1 i b2[i] b2 i if(b12 > mx) mx = b12; b12 > mx b12 mx mx = b12 mx b12 out.println(mx) out.println out mx String[] args args public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	}
} public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	}
} Main
import java.util.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		long[] a1 = new long[n];
		long[] a2 = new long[n];
		for(i=0;i<n;i++) {
			a1[i] = parseLong(sc.next());
		}
		for(i=0;i<n;i++) {
			a2[i] = parseLong(sc.next());
		}
		sc.close();
		long[] b1 = new long[n];
		long[] b2 = new long[n];
		b1[0] = a1[0];
		b2[n-1] = a2[n-1];
		for(i=1;i<n;i++) {
			b1[i] = a1[i]+b1[i-1];
			b2[n-1-i] = a2[n-1-i]+b2[n-i];
		}
		long mx=0;
		long b12=0;
		for(i=0;i<n;i++) {
			b12 = b1[i] + b2[i];
			if(b12 > mx) mx = b12;
		}
		out.println(mx);
	}
}
