import java.util.Scanner;

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];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	}
} import java.util.Scanner; Scanner java.util 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];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] a = new int[2][n];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] a = new int[2][n];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	} 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 int max = 0; max 0 int right = 0; right 0 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 for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		} {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		} right += a[0][i] right a[0][i] a[0] a 0 i int sum = right; sum right for(int j = i; j <n; j++) {
				sum += a[1][j];
			} int j = i; int j = i; j i j <n j n j++ j++ j {
				sum += a[1][j];
			} {
				sum += a[1][j];
			} sum += a[1][j] sum a[1][j] a[1] a 1 j max = Math.max(sum, max) max Math.max(sum, max) Math.max Math sum max System.out.println(max) System.out.println System.out System System.out max 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];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	}
} 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];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	}
} Main
import java.util.Scanner;

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];
		int max = 0;
		int right = 0;
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for(int i = 0; i < n; i++) {
			right += a[0][i];
			int sum = right;
			for(int j = i; j <n; j++) {
				sum += a[1][j];
			}
			max = Math.max(sum, max);
		}
		System.out.println(max);
	}
}