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