import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int[] b = new int[a]; b new int[a] a int[] c = new int[a]; c new int[a] a int max = 0; max 0 for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            b[i] = sc.nextInt();
        } {
            b[i] = sc.nextInt();
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            c[i] = sc.nextInt();
        } {
            c[i] = sc.nextInt();
        } c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        } {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        } int total = 0; total 0 for(int j=0; j<=i; j++) {
                total += b[j];
            } int j=0; int j=0; j 0 j<=i j i j++ j++ j {
                total += b[j];
            } {
                total += b[j];
            } total += b[j] total b[j] b j for(int k=i;k<a;k++) {
                total += c[k];
            } int k=i; int k=i; k i k<a k a k++ k++ k {
                total += c[k];
            } {
                total += c[k];
            } total += c[k] total c[k] c k if(total > max) {
                max = total;
            } total > max total max {
                max = total;
            } max = total max total System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] b = new int[a];
        int[] c = new int[a];
        int max = 0;
        for(int i=0; i<a; i++) {
            b[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            c[i] = sc.nextInt();
        }
        for(int i=0; i<a; i++) {
            int total = 0;
            for(int j=0; j<=i; j++) {
                total += b[j];
            }
            for(int k=i;k<a;k++) {
                total += c[k];
            }
            if(total > max) {
                max = total;
            }
        }
        System.out.println(max);
    }
}
