import java.util.*;
import static java.lang.Math.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	}
}

 import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] a = new int[2][n]; a new int[2][n] 2 n for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
				a[i][j] = sc.nextInt();
			} {
				a[i][j] = sc.nextInt();
			} a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc int maxCandies = 0; maxCandies 0 for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		} int m = 0; int m = 0; m 0 m < n m n m++ m++ m {
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		} {
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		} int temp = 0; temp 0 for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			} int k = 0; int k = 0; k 0 k <= m k m k++ k++ k {
				temp = temp + a[0][k];
			} {
				temp = temp + a[0][k];
			} temp = temp + a[0][k] temp temp + a[0][k] temp a[0][k] a[0] a 0 k for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			} int k = m; int k = m; k m k < n k n k++ k++ k {
				temp = temp + a[1][k];
			} {
				temp = temp + a[1][k];
			} temp = temp + a[1][k] temp temp + a[1][k] temp a[1][k] a[1] a 1 k maxCandies = max(maxCandies, temp) maxCandies max(maxCandies, temp) max maxCandies temp System.out.println(maxCandies) System.out.println System.out System System.out maxCandies String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	}
} Main
import java.util.*;
import static java.lang.Math.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 入力
		int n = sc.nextInt();// 列数

		int[][] a = new int[2][n];
		for(int i = 0; i < 2; i++){
			for(int j = 0; j < n; j++){
				a[i][j] = sc.nextInt();
			}
		}

		// 計算
		int maxCandies = 0;

		for(int m = 0; m < n; m++){
			int temp = 0;
			for(int k = 0; k <= m; k++){
				temp = temp + a[0][k];
			}
			for(int k = m; k < n; k++){
				temp = temp + a[1][k];
			}
			maxCandies = max(maxCandies, temp);
		}
		// 出力
		System.out.println(maxCandies);
	}
}


