import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int x[][] = new int[2][n];
       for(int i = 0; i < 2; i++){
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       }
       int ans = 0;
       for(int i = 0; i < n; i++){
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int x[][] = new int[2][n];
       for(int i = 0; i < 2; i++){
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       }
       int ans = 0;
       for(int i = 0; i < n; i++){
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       }
        System.out.println(ans);
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int x[][] = new int[2][n];
       for(int i = 0; i < 2; i++){
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       }
       int ans = 0;
       for(int i = 0; i < n; i++){
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int x[][] = new int[2][n];
       for(int i = 0; i < 2; i++){
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       }
       int ans = 0;
       for(int i = 0; i < n; i++){
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int x[][] = new int[2][n]; x new int[2][n] 2 n for(int i = 0; i < 2; i++){
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       } {
           for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           }
       } for(int j = 0; j < n; j++){
               x[i][j] = sc.nextInt();
           } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
               x[i][j] = sc.nextInt();
           } {
               x[i][j] = sc.nextInt();
           } x[i][j] = sc.nextInt() x[i][j] x[i] x i j sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i = 0; i < n; i++){
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       } {
           int count = 0;
           for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           }
           ans = Math.max(ans,count);
           //System.out.println(count);
       } int count = 0; count 0 for(int j = 0; j < n; j++){
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           } {
               if(i == j){
                   count += x[0][j];
               }
               if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               }
           } if(i == j){
                   count += x[0][j];
               } i == j i j {
                   count += x[0][j];
               } count += x[0][j] count x[0][j] x[0] x 0 j if(i <= j){
                   count += x[1][j];
               }else {
                   count += x[0][j];
               } i <= j i j {
                   count += x[1][j];
               } count += x[1][j] count x[1][j] x[1] x 1 j {
                   count += x[0][j];
               } count += x[0][j] count x[0][j] x[0] x 0 j ans = Math.max(ans,count) ans Math.max(ans,count) Math.max Math ans count System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.Scanner;

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