import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int total_row = sc.nextInt(); total_row sc.nextInt() sc.nextInt sc int answer = 0; answer 0 List<Integer> FirstRowCandy = new ArrayList<Integer>(); FirstRowCandy new ArrayList<Integer>() for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    } int i = 0; int i = 0; i 0 i < total_row i total_row i++ i++ i {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    } {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    } int candy = sc.nextInt(); candy sc.nextInt() sc.nextInt sc FirstRowCandy.add(candy) FirstRowCandy.add FirstRowCandy candy List<Integer> SecondRowCandy = new ArrayList<Integer>(); SecondRowCandy new ArrayList<Integer>() for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    } int i = 0; int i = 0; i 0 i < total_row i total_row i++ i++ i {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    } {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    } int candy = sc.nextInt(); candy sc.nextInt() sc.nextInt sc SecondRowCandy.add(candy) SecondRowCandy.add SecondRowCandy candy for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    } int i = 0; int i = 0; i 0 i < total_row i total_row i++ i++ i {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    } {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    } int tmp_answer = 0; tmp_answer 0 for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	} {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	} tmp_answer = tmp_answer + FirstRowCandy.get(j) tmp_answer tmp_answer + FirstRowCandy.get(j) tmp_answer FirstRowCandy.get(j) FirstRowCandy.get FirstRowCandy j for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	} int j = total_row -1; int j = total_row -1; j total_row -1 total_row 1 j >= i j i j-- j-- j {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	} {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	} tmp_answer = tmp_answer + SecondRowCandy.get(j) tmp_answer tmp_answer + SecondRowCandy.get(j) tmp_answer SecondRowCandy.get(j) SecondRowCandy.get SecondRowCandy j if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	} tmp_answer > answer tmp_answer answer {
	    		answer = tmp_answer;
	    	} answer = tmp_answer answer tmp_answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int total_row = sc.nextInt();
	    int answer = 0;

	    List<Integer> FirstRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	FirstRowCandy.add(candy);
	    }

	    List<Integer> SecondRowCandy = new ArrayList<Integer>();

	    for (int i = 0; i < total_row; i++) {
	    	int candy = sc.nextInt();
	    	SecondRowCandy.add(candy);
	    }

	    for (int i = 0; i < total_row; i++) {
	    	int tmp_answer = 0;

	    	for (int j = 0; j <= i ; j++) {
	    		tmp_answer = tmp_answer + FirstRowCandy.get(j);
	    	}
	    	for (int j = total_row -1; j >= i; j--) {
	    		tmp_answer = tmp_answer + SecondRowCandy.get(j);
	    	}

	    	if (tmp_answer > answer) {
	    		answer = tmp_answer;
	    	}

	    }
	    System.out.println(answer);
	}
}