import java.util.*;

public class Main {
	public static void main(String[] args)  {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	}
}
//end import java.util.*; util.* java public class Main {
	public static void main(String[] args)  {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	}
} Main public static void main(String[] args)  {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	} main {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	} Scanner scan =new Scanner(System.in); scan new Scanner(System.in) int n=Integer.parseInt(scan.nextLine()); n Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int[][] a = new int [2][n]; a new int [2][n] 2 n for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next()); int i = 0; int i = 0; i 0 i < n i n ++i ++i i a[0][i]=Integer.parseInt(scan.next()); a[0][i]=Integer.parseInt(scan.next()) a[0][i] a[0] a 0 i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan scan.nextLine() scan.nextLine scan for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next()); int i = 0; int i = 0; i 0 i < n i n ++i ++i i a[1][i]=Integer.parseInt(scan.next()); a[1][i]=Integer.parseInt(scan.next()) a[1][i] a[1] a 1 i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan long[] cs_upper = new long [n]; cs_upper new long [n] n cs_upper[0]=a[0][0] cs_upper[0] cs_upper 0 a[0][0] a[0] a 0 0 long[] cs_lower = new long [n]; cs_lower new long [n] n cs_lower[n-1]=a[1][n-1] cs_lower[n-1] cs_lower n-1 n 1 a[1][n-1] a[1] a 1 n-1 n 1 for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		} int i = 1; int i = 1; i 1 i < n i n ++i ++i i {
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		} {
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		} cs_upper[i] = cs_upper[i-1]+a[0][i] cs_upper[i] cs_upper i cs_upper[i-1]+a[0][i] cs_upper[i-1] cs_upper i-1 i 1 a[0][i] a[0] a 0 i cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1] cs_lower[n-i-1] cs_lower n-i-1 n-i-1 n i 1 cs_lower[n-i]+a[1][n-i-1] cs_lower[n-i] cs_lower n-i n i a[1][n-i-1] a[1] a 1 n-i-1 n-i-1 n i 1 long max=0; max 0 for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		} {
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		} max=Math.max(max, cs_lower[i]+cs_upper[i]) max Math.max(max, cs_lower[i]+cs_upper[i]) Math.max Math max cs_lower[i]+cs_upper[i] cs_lower[i] cs_lower i cs_upper[i] cs_upper i System.out.print(max) System.out.print System.out System System.out max String[] args args public class Main {
	public static void main(String[] args)  {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	}
} public class Main {
	public static void main(String[] args)  {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args)  {
		Scanner scan =new Scanner(System.in);
		int n=Integer.parseInt(scan.nextLine());
		int[][] a = new int [2][n];
		for (int i = 0;i < n ;++i)a[0][i]=Integer.parseInt(scan.next());
		scan.nextLine();
		for (int i = 0;i < n ;++i)a[1][i]=Integer.parseInt(scan.next());

		long[] cs_upper = new long [n];cs_upper[0]=a[0][0];
		long[] cs_lower = new long [n];cs_lower[n-1]=a[1][n-1];
		for (int i = 1;i < n; ++i){
			cs_upper[i] = cs_upper[i-1]+a[0][i];
			cs_lower[n-i-1] = cs_lower[n-i]+a[1][n-i-1];
		}
		long max=0;
		for (int i = 0;i < n;++i){
			max=Math.max(max, cs_lower[i]+cs_upper[i]);
		}
		System.out.print(max);
	}
}
//end
