import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	}
} Main public static void main(String[] args) {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	} main {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int trout = sc.nextInt(); trout sc.nextInt() sc.nextInt sc int[] Line1 = new int[trout]; Line1 new int[trout] trout int[] Line2 = new int[trout]; Line2 new int[trout] trout for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < trout i trout i++ i++ i {
			Line1[i] = sc.nextInt();
		} {
			Line1[i] = sc.nextInt();
		} Line1[i] = sc.nextInt() Line1[i] Line1 i sc.nextInt() sc.nextInt sc for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < trout i trout i++ i++ i {
			Line2[i] = sc.nextInt();
		} {
			Line2[i] = sc.nextInt();
		} Line2[i] = sc.nextInt() Line2[i] Line2 i sc.nextInt() sc.nextInt sc int Result = 0; Result 0 for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		} int i = 0; int i = 0; i 0 i < trout i trout i++ i++ i {
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		} {
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		} int total = 0; total 0 for(int j = 0; j <= i; j++){
				total += Line1[j];
			} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
				total += Line1[j];
			} {
				total += Line1[j];
			} total += Line1[j] total Line1[j] Line1 j for(int j = i; j < trout; j++){
				total += Line2[j];
			} int j = i; int j = i; j i j < trout j trout j++ j++ j {
				total += Line2[j];
			} {
				total += Line2[j];
			} total += Line2[j] total Line2[j] Line2 j if(Result < total){
				Result = total;
			} Result < total Result total {
				Result = total;
			} Result = total Result total System.out.println(Result) System.out.println System.out System System.out Result sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		//@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int trout = sc.nextInt();
		int[] Line1 = new int[trout];
		int[] Line2 = new int[trout];
		for(int i = 0; i < trout; i++){
			Line1[i] = sc.nextInt();
		}
		for(int i = 0; i < trout; i++){
			Line2[i] = sc.nextInt();
		}
		int Result = 0;
		for(int i = 0; i < trout; i++){
			int total = 0;
            for(int j = 0; j <= i; j++){
				total += Line1[j];
			}
			for(int j = i; j < trout; j++){
				total += Line2[j];
			}
			if(Result < total){
				Result = total;
			}
		}
		System.out.println(Result);
		sc.close();
	}
}

