import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for(int i = 0; i < 2; i++){
            for(int j = 0; j < n; j++){
                a[i][j] = scan.nextInt();
            }
        }
        int[][] sum = new int[2][n];
        sum[0][0] = a[0][0];
        sum[1][0] = a[1][0];
        for(int i = 1; i < n; i++){
            sum[0][i] = sum[0][i - 1] + a[0][i];
            sum[1][i] = sum[1][i - 1] + a[1][i];
        }
        int out = 0;
        for(int i = 0; i < n; i++){
            out = Math.max(out, sum[0][i] + sum[1][n - 1] - sum[1][i] + a[1][i]);
        }
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.*; util.* java public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for(int i = 0; i < 2; i++){
            for(int j = 0; j < n; j++){
                a[i][j] = scan.nextInt();
            }
        }
        int[][] sum = new int[2][n];
        sum[0][0] = a[0][0];
        sum[1][0] = a[1][0];
        for(int i = 1; i < n; i++){
            sum[0][i] = sum[0][i - 1] + a[0][i];
            sum[1][i] = sum[1][i - 1] + a[1][i];
        }
        int out = 0;
        for(int i = 0; i < n; i++){
            out = Math.max(out, sum[0][i] + sum[1][n - 1] - sum[1][i] + a[1][i]);
        }
        System.out.println(out);
    }

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

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

    public static void main(String[] args){
        new Main().solve();
    }
} Main
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for(int i = 0; i < 2; i++){
            for(int j = 0; j < n; j++){
                a[i][j] = scan.nextInt();
            }
        }
        int[][] sum = new int[2][n];
        sum[0][0] = a[0][0];
        sum[1][0] = a[1][0];
        for(int i = 1; i < n; i++){
            sum[0][i] = sum[0][i - 1] + a[0][i];
            sum[1][i] = sum[1][i - 1] + a[1][i];
        }
        int out = 0;
        for(int i = 0; i < n; i++){
            out = Math.max(out, sum[0][i] + sum[1][n - 1] - sum[1][i] + a[1][i]);
        }
        System.out.println(out);
    }

    public static void main(String[] args){
        new Main().solve();
    }
}
