import java.util.Scanner;

public class Main {
    
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc int map[][] = new int[2][N]; map new int[2][N] 2 N int sum[][] = new int[2][N]; sum new int[2][N] 2 N for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        } {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        } for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	} {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	} map[i][j] = sc.nextInt() map[i][j] map[i] map i j sc.nextInt() sc.nextInt sc if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		} j == 0 j 0 {
        			sum[i][j] = map[i][j];
        		} sum[i][j] = map[i][j] sum[i][j] sum[i] sum i j map[i][j] map[i] map i j {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		} sum[i][j] = sum[i][j - 1] + map[i][j] sum[i][j] sum[i] sum i j sum[i][j - 1] + map[i][j] sum[i][j - 1] sum[i] sum i j - 1 j 1 map[i][j] map[i] map i j sc.nextLine() sc.nextLine sc int ans = 0; ans 0 for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        } int start = N; int start = N; start N start > 0 start 0 start-- start-- start {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        } {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        } int candies = 0; candies 0 if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	} start == 1 start 1 {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} candies = sum[0][start - 1] + (sum[1][N - 1]) candies sum[0][start - 1] + (sum[1][N - 1]) sum[0][start - 1] sum[0] sum 0 start - 1 start 1 (sum[1][N - 1]) sum[1] sum 1 N - 1 N 1 {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	} candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]) candies sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]) sum[0][start - 1] sum[0] sum 0 start - 1 start 1 (sum[1][N - 1] - sum[1][start - 2]) sum[1][N - 1] sum[1] sum 1 N - 1 N 1 sum[1][start - 2] sum[1] sum 1 start - 2 start 2 if (ans < candies) {
        		ans = candies;
        	} ans < candies ans candies {
        		ans = candies;
        	} ans = candies ans candies System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    }
} public class Main {
    
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        sc.nextLine();
        int map[][] = new int[2][N];
        int sum[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
        	for (int j = 0; j < N; j++) {
        		
        		map[i][j] = sc.nextInt();
        		
        		if (j == 0) {
        			sum[i][j] = map[i][j];
        		} else {
        			sum[i][j] = sum[i][j - 1] + map[i][j];
        		}
        	}
        	sc.nextLine();
        }
        
        int ans = 0;
        
        for (int start = N; start > 0; start--) {
        	int candies = 0;
        	if (start == 1) {
        		candies = sum[0][start - 1] + (sum[1][N - 1]);
        	} else {
            	candies = sum[0][start - 1] + (sum[1][N - 1] - sum[1][start - 2]);
        	}
        	if (ans < candies) {
        		ans = candies;
        	}
        }
        
        System.out.println(ans);
    }
}
