import java.util.Scanner;

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();
            }
        }
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        }
        int ans = a[0][0] + a[1][n - 1];
        for (int i = 1; i < n; i++) {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        }
        System.out.println(ans);
        sc.close();
    }
} 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 a[][] = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        }
        int ans = a[0][0] + a[1][n - 1];
        for (int i = 1; i < n; i++) {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        }
        System.out.println(ans);
        sc.close();
    }
} 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();
            }
        }
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        }
        int ans = a[0][0] + a[1][n - 1];
        for (int i = 1; i < n; i++) {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        }
        System.out.println(ans);
        sc.close();
    } 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();
            }
        }
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        }
        int ans = a[0][0] + a[1][n - 1];
        for (int i = 1; i < n; i++) {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        }
        System.out.println(ans);
        sc.close();
    } 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 for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        } {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        } for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            } int j = 1; int j = 1; j 1 j < n j n j++ j++ j {
                a[i][j] = a[i][j] + a[i][j - 1];
            } {
                a[i][j] = a[i][j] + a[i][j - 1];
            } a[i][j] = a[i][j] + a[i][j - 1] a[i][j] a[i] a i j a[i][j] + a[i][j - 1] a[i][j] a[i] a i j a[i][j - 1] a[i] a i j - 1 j 1 int ans = a[0][0] + a[1][n - 1]; ans a[0][0] + a[1][n - 1] a[0][0] a[0] a 0 0 a[1][n - 1] a[1] a 1 n - 1 n 1 for (int i = 1; i < n; i++) {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        } {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        } int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1]; tmp a[0][i] + a[1][n - 1] - a[1][i - 1] a[0][i] + a[1][n - 1] a[0][i] a[0] a 0 i a[1][n - 1] a[1] a 1 n - 1 n 1 a[1][i - 1] a[1] a 1 i - 1 i 1 ans = Math.max(ans, tmp) ans Math.max(ans, tmp) Math.max Math ans tmp System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc 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 a[][] = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < 2; i++) {
            for (int j = 1; j < n; j++) {
                a[i][j] = a[i][j] + a[i][j - 1];
            }
        }
        int ans = a[0][0] + a[1][n - 1];
        for (int i = 1; i < n; i++) {
            int tmp = a[0][i] + a[1][n - 1] - a[1][i - 1];
            ans = Math.max(ans, tmp);
        }
        System.out.println(ans);
        sc.close();
    }
}
