import java.util.*;

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

class Main{
public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[][] a = new int[2][n];
    for(int i = 0; i < n; i++) {
    	a[0][i] = sc.nextInt();
    }
    for(int i = 0; i < n; i++) {
    	a[1][i] = sc.nextInt();
    }
    int x = 0;
    int y = 0;
    int max = 0;
    for(int i = 0; i < n; i++) {
    	x += a[0][i];
    	for(int j = i; j < n; j++) {
    		y += a[1][j];
    	}
    	if(max < x + y) {
    		max = x + y;
    	}
    	y = 0;
    }
    System.out.println(max);
}
}