
import java.util.*;

public class Main {

    static boolean[] bits;

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

} import java.util.*; util.* java public class Main {

    static boolean[] bits;

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

} Main static boolean[] bits; bits public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] sum = new int[2][n+1];
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n+1; j++) {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            }
        }
        int ans=0;
        for(int i=0;i<n;i++){
            ans=Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] sum = new int[2][n+1];
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n+1; j++) {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            }
        }
        int ans=0;
        for(int i=0;i<n;i++){
            ans=Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]);
        }
        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[][] sum = new int[2][n+1]; sum new int[2][n+1] 2 n+1 n 1 for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n+1; j++) {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 1; j < n+1; j++) {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            }
        } {
            for (int j = 1; j < n+1; j++) {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            }
        } for (int j = 1; j < n+1; j++) {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            } int j = 1; int j = 1; j 1 j < n+1 j n+1 n 1 j++ j++ j {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            } {
                sum[i][j] = sum[i][j - 1] + sc.nextInt();
            } sum[i][j] = sum[i][j - 1] + sc.nextInt() sum[i][j] sum[i] sum i j sum[i][j - 1] + sc.nextInt() sum[i][j - 1] sum[i] sum i j - 1 j 1 sc.nextInt() sc.nextInt sc int ans=0; ans 0 for(int i=0;i<n;i++){
            ans=Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            ans=Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]);
        } {
            ans=Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]);
        } ans=Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]) ans Math.max(ans,sum[0][i+1]+sum[1][n]-sum[1][i]) Math.max Math ans sum[0][i+1]+sum[1][n]-sum[1][i] sum[0][i+1]+sum[1][n] sum[0][i+1] sum[0] sum 0 i+1 i 1 sum[1][n] sum[1] sum 1 n sum[1][i] sum[1] sum 1 i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    static boolean[] bits;

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

} public class Main {

    static boolean[] bits;

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

} Main

import java.util.*;

public class Main {

    static boolean[] bits;

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

}
