import java.util.*;

public class Main {

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

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	}
} import java.util.*; util.* java public class Main {

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

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n; n int graph[][] = new int[2][101]; graph new int[2][101] 2 101 n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		} int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		} {
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		} for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				graph[i][j] = scanner.nextInt();
			} {
				graph[i][j] = scanner.nextInt();
			} graph[i][j] = scanner.nextInt() graph[i][j] graph[i] graph i j scanner.nextInt() scanner.nextInt scanner int value[][] = new int[2][101]; value new int[2][101] 2 101 int j=1; j 1 value[0][0] = graph[0][0] value[0][0] value[0] value 0 0 graph[0][0] graph[0] graph 0 0 value[1][0] = graph[1][0]+graph[0][0] value[1][0] value[1] value 1 0 graph[1][0]+graph[0][0] graph[1][0] graph[1] graph 1 0 graph[0][0] graph[0] graph 0 0 if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                } n > 1 n 1 {
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                } value[0][1] = graph[0][1]+graph[0][0] value[0][1] value[0] value 0 1 graph[0][1]+graph[0][0] graph[0][1] graph[0] graph 0 1 graph[0][0] graph[0] graph 0 0 while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		} true {
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		} if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			} value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j] value[0][j] + graph[1][j] value[0][j] value[0] value 0 j graph[1][j] graph[1] graph 1 j value[1][j-1] + graph[1][j] value[1][j-1] value[1] value 1 j-1 j 1 graph[1][j] graph[1] graph 1 j {
				value[1][j] =  value[0][j] + graph[1][j];
			} value[1][j] =  value[0][j] + graph[1][j] value[1][j] value[1] value 1 j value[0][j] + graph[1][j] value[0][j] value[0] value 0 j graph[1][j] graph[1] graph 1 j {
				value[1][j] =  value[1][j-1] + graph[1][j];
			} value[1][j] =  value[1][j-1] + graph[1][j] value[1][j] value[1] value 1 j value[1][j-1] + graph[1][j] value[1][j-1] value[1] value 1 j-1 j 1 graph[1][j] graph[1] graph 1 j if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			} j == n-1 j n-1 n 1 {
				break;
			} break; {
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			} value[0][j+1] = value[0][j] + graph[0][j+1] value[0][j+1] value[0] value 0 j+1 j 1 value[0][j] + graph[0][j+1] value[0][j] value[0] value 0 j graph[0][j+1] graph[0] graph 0 j+1 j 1 j++ j System.out.println(value[1][n-1]) System.out.println System.out System System.out value[1][n-1] value[1] value 1 n-1 n 1 {
		System.out.println(value[1][0]);
                } System.out.println(value[1][0]) System.out.println System.out System System.out value[1][0] value[1] value 1 0 scanner.close() scanner.close scanner String[] args args public class Main {

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

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	}
} public class Main {

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

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	}
} Main
import java.util.*;

public class Main {

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

		int n;
		int graph[][] = new int[2][101];

		// 入力
		n = scanner.nextInt();
		for(int i=0; i<2; i++){
			for(int j=0; j<n; j++){
				graph[i][j] = scanner.nextInt();
			}
		}

		//探索
		int value[][] = new int[2][101];
		int j=1;
		value[0][0] = graph[0][0];
		value[1][0] = graph[1][0]+graph[0][0];
                if(n > 1){
		value[0][1] = graph[0][1]+graph[0][0];
		while(true){
			if(value[0][j] + graph[1][j] > value[1][j-1] + graph[1][j]){
				value[1][j] =  value[0][j] + graph[1][j];
			}else{
				value[1][j] =  value[1][j-1] + graph[1][j];
			}

			if(j == n-1){
				break;
			}else{
				value[0][j+1] = value[0][j] + graph[0][j+1];
				j++;
			}
		}
		System.out.println(value[1][n-1]);
                }else{
		System.out.println(value[1][0]);
                }
		scanner.close();
	}
}