import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    } main {
        Main main = new Main();
        main.solve();
    } Main main = new Main(); main new Main() main.solve() main.solve main String[] args args public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    } solve {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1]; s new int[2][N+1] 2 N+1 N 1 s[0][0] = 0 s[0][0] s[0] s 0 0 0 for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        } {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        } s[0][i+1] = s[0][i]+ a[0][i] s[0][i+1] s[0] s 0 i+1 i 1 s[0][i]+ a[0][i] s[0][i] s[0] s 0 i a[0][i] a[0] a 0 i s[1][i+1] = s[1][i]+ a[1][i] s[1][i+1] s[1] s 1 i+1 i 1 s[1][i]+ a[1][i] s[1][i] s[1] s 1 i a[1][i] a[1] a 1 i int answer = 0; answer 0 for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        } {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        } int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1]; t s[0][i]-s[0][0] + s[1][N]-s[1][i-1] s[0][i]-s[0][0] + s[1][N] s[0][i]-s[0][0] s[0][i] s[0] s 0 i s[0][0] s[0] s 0 0 s[1][N] s[1] s 1 N s[1][i-1] s[1] s 1 i-1 i 1 answer = Math.max(t, answer) answer Math.max(t, answer) Math.max Math t answer System.out.println(answer) System.out.println System.out System System.out answer public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(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[][] s = new int[2][N+1];
        s[0][0] = 0;
        for (int i = 0; i < N; i++) {
            s[0][i+1] = s[0][i]+ a[0][i];
            s[1][i+1] = s[1][i]+ a[1][i];
        }
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            int t = s[0][i]-s[0][0] + s[1][N]-s[1][i-1];
            answer = Math.max(t, answer);
        }
        System.out.println(answer);
    }
}
