import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[][] a = new int[2][N]; a new int[2][N] 2 N for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
            a[0][j] = Integer.parseInt(sc.next());
        } {
            a[0][j] = Integer.parseInt(sc.next());
        } a[0][j] = Integer.parseInt(sc.next()) a[0][j] a[0] a 0 j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
            a[1][j] = Integer.parseInt(sc.next());
        } {
            a[1][j] = Integer.parseInt(sc.next());
        } a[1][j] = Integer.parseInt(sc.next()) a[1][j] a[1] a 1 j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        } int i = N - 1; int i = N - 1; i N - 1 N 1 i >= 0 i 0 i-- i-- i {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        } {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        } int sum = 0; sum 0 for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                sum += a[0][j];
            } {
                sum += a[0][j];
            } sum += a[0][j] sum a[0][j] a[0] a 0 j for (int j = i; j < N; j++) {
                sum += a[1][j];
            } int j = i; int j = i; j i j < N j N j++ j++ j {
                sum += a[1][j];
            } {
                sum += a[1][j];
            } sum += a[1][j] sum a[1][j] a[1] a 1 j ans = Math.max(ans, sum) ans Math.max(ans, sum) Math.max Math ans sum out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        final int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for (int j = 0; j < N; j++) {
            a[0][j] = Integer.parseInt(sc.next());
        }
        for (int j = 0; j < N; j++) {
            a[1][j] = Integer.parseInt(sc.next());
        }
        int ans = 0;
        
        for (int i = N - 1; i >= 0; i--) {
            int sum = 0;
            for (int j = 0; j <= i; j++) {
                sum += a[0][j];
            }
            for (int j = i; j < N; j++) {
                sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }

        out.println(ans);
        
        out.flush();
    }
}