// package app;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.StringJoiner;
import java.util.stream.Stream;

public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Objects; Objects java.util import java.util.Scanner; Scanner java.util import java.util.StringJoiner; StringJoiner java.util import java.util.stream.Stream; Stream java.util.stream public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    }
} Main public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    } main {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] route = new int[2][N]; route new int[2][N] 2 N for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        } {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        } route[i] = new int[N] route[i] route i new int[N] N for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                route[i][j] = sc.nextInt();
            } {
                route[i][j] = sc.nextInt();
            } route[i][j] = sc.nextInt() route[i][j] route[i] route i j sc.nextInt() sc.nextInt sc int maxCandy = Integer.MIN_VALUE; maxCandy Integer.MIN_VALUE Integer Integer.MIN_VALUE for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        } {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        } int tmp = 0; tmp 0 int h = 0; h 0 for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            } {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            } tmp += route[h][j] tmp route[h][j] route[h] route h j if (i == j){
                    h++;
                    tmp += route[h][j];
                } i == j i j {
                    h++;
                    tmp += route[h][j];
                } h++ h tmp += route[h][j] tmp route[h][j] route[h] route h j maxCandy = Math.max(maxCandy, tmp) maxCandy Math.max(maxCandy, tmp) Math.max Math maxCandy tmp System.out.println(maxCandy) System.out.println System.out System System.out maxCandy final String[] args args public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    }
} public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    }
} Main
// package app;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.StringJoiner;
import java.util.stream.Stream;

public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // String S = sc.next();
        // long u = sc.nextLong();

        int N = sc.nextInt();

        int[][] route = new int[2][N];
        for (int i = 0; i < 2; i++) {
            route[i] = new int[N];
            for(int j = 0; j < N; j++) {
                route[i][j] = sc.nextInt();
            }
        }

        int maxCandy = Integer.MIN_VALUE;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            int h = 0;
            for (int j = 0; j < N; j++) {
                tmp += route[h][j];
                if (i == j){
                    h++;
                    tmp += route[h][j];
                }
            }
            maxCandy = Math.max(maxCandy, tmp);
        }

        System.out.println(maxCandy);
    }
}