import java.util.Scanner;

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

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		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[] a1 = new int [n];
		int[] a2 = new int [n];

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a1 = new int [n];
		int[] a2 = new int [n];

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a1 = new int [n];
		int[] a2 = new int [n];

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		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[] a1 = new int [n]; a1 new int [n] n int[] a2 = new int [n]; a2 new int [n] n for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a1[i] = sc.nextInt();
		} {
			a1[i] = sc.nextInt();
		} a1[i] = sc.nextInt() a1[i] a1 i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a2[i] = sc.nextInt();
		} {
			a2[i] = sc.nextInt();
		} a2[i] = sc.nextInt() a2[i] a2 i sc.nextInt() sc.nextInt sc int max = 0; max 0 int idx = 0; idx 0 while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		} idx < n idx n {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		} int sum = 0; sum 0 for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			} int i = 0; int i = 0; i 0 i <= idx i idx i++ i++ i {
				sum += a1[i];
			} {
				sum += a1[i];
			} sum += a1[i] sum a1[i] a1 i for(int i = idx; i < n; i++) {
				sum += a2[i];
			} int i = idx; int i = idx; i idx i < n i n i++ i++ i {
				sum += a2[i];
			} {
				sum += a2[i];
			} sum += a2[i] sum a2[i] a2 i max = Math.max(max, sum) max Math.max(max, sum) Math.max Math max sum idx++ idx 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[] a1 = new int [n];
		int[] a2 = new int [n];

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		System.out.println(max);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a1 = new int [n];
		int[] a2 = new int [n];

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		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[] a1 = new int [n];
		int[] a2 = new int [n];

		for(int i = 0; i < n; i++) {
			a1[i] = sc.nextInt();
		}
		for(int i = 0; i < n; i++) {
			a2[i] = sc.nextInt();
		}

		int max = 0;
		int idx = 0;
		while(idx < n) {
			int sum = 0;
			for(int i = 0; i <= idx; i++) {
				sum += a1[i];
			}

			for(int i = idx; i < n; i++) {
				sum += a2[i];
			}
			max = Math.max(max, sum);
            idx++;
		}
		System.out.println(max);
	}
}