import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int a1[] = new int[n+2]; a1 new int[n+2] n+2 n 2 int a2[] = new int[n+1]; a2 new int[n+1] n+1 n 1 a1[0] = 0 a1[0] a1 0 0 a2[0] = 0 a2[0] a2 0 0 int sum = 0; sum 0 int subsum = 0; subsum 0 int sum1 = 0; sum1 0 int sum2 = 0; sum2 0 for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            a1[i] = sc.nextInt();
        } {
            a1[i] = sc.nextInt();
        } a1[i] = sc.nextInt() a1[i] a1 i sc.nextInt() sc.nextInt sc sum1 = a1[1] sum1 a1[1] a1 1 a1[n+1] = 0 a1[n+1] a1 n+1 n 1 0 for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        } {
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        } a2[i] = sc.nextInt() a2[i] a2 i sc.nextInt() sc.nextInt sc sum2 += a2[i] sum2 a2[i] a2 i for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        } {
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        } subsum = sum1+sum2 subsum sum1+sum2 sum1 sum2 if(subsum>sum){
                sum = subsum;
            } subsum>sum subsum sum {
                sum = subsum;
            } sum = subsum sum subsum sum1 += a1[i+1] sum1 a1[i+1] a1 i+1 i 1 sum2 -= a2[i] sum2 a2[i] a2 i System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a1[] = new int[n+2];
        int a2[] = new int[n+1];
        a1[0] = 0;
        a2[0] = 0;
        int sum = 0;
        int subsum = 0;
        int sum1 = 0;
        int sum2 = 0;
        for(int i=1;i<=n;i++){
            a1[i] = sc.nextInt();
        }
        sum1 = a1[1];
        a1[n+1] = 0;
        for(int i=1;i<=n;i++){
            a2[i] = sc.nextInt();
            sum2 += a2[i];
        }
        for(int i=1;i<=n;i++){
            subsum = sum1+sum2;
            if(subsum>sum){
                sum = subsum;
            }
            sum1 += a1[i+1];
            sum2 -= a2[i];
        }
        System.out.println(sum);
    }
}
