import java.util.*;

import static java.lang.System.*;

public 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    }
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    }
} 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    } 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    } 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 int max = 0; max 0 for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        } int k = 0; int k = 0; k 0 k < N k N k++ k++ k {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        } {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        } int tmpMax = 0; tmpMax 0 for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            } int j = 0; int j = 0; j 0 j <= k j k j++ j++ j {
                tmpMax += A[0][j];
            } {
                tmpMax += A[0][j];
            } tmpMax += A[0][j] tmpMax A[0][j] A[0] A 0 j for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            } int j = k; int j = k; j k j < N j N j++ j++ j {
                tmpMax += A[1][j];
            } {
                tmpMax += A[1][j];
            } tmpMax += A[1][j] tmpMax A[1][j] A[1] A 1 j max = Math.max(max, tmpMax) max Math.max(max, tmpMax) Math.max Math max tmpMax out.println(max) out.println out max String[] args args public 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    }
} public 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    }
} Main
import java.util.*;

import static java.lang.System.*;

public 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();
            }
        }

        int max = 0;
        for (int k = 0; k < N; k++) {
            int tmpMax = 0;
            for (int j = 0; j <= k; j++) {
                tmpMax += A[0][j];
            }

            for (int j = k; j < N; j++) {
                tmpMax += A[1][j];
            }
            max = Math.max(max, tmpMax);
        }

        out.println(max);
    }
}