import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        int[][] l = new int[2][N];
        int ans = 0;
        for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt();
        for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        }
        ans += l[0][0];
        int a = ans;
        for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        int[][] l = new int[2][N];
        int ans = 0;
        for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt();
        for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        }
        ans += l[0][0];
        int a = ans;
        for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        int[][] l = new int[2][N];
        int ans = 0;
        for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt();
        for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        }
        ans += l[0][0];
        int a = ans;
        for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        int[][] l = new int[2][N];
        int ans = 0;
        for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt();
        for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        }
        ans += l[0][0];
        int a = ans;
        for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] l = new int[2][N]; l new int[2][N] 2 N int ans = 0; ans 0 for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < N i N i++ i++ i l[0][i] = sc.nextInt(); l[0][i] = sc.nextInt() l[0][i] l[0] l 0 i sc.nextInt() sc.nextInt sc for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        } {
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        } l[1][i] = sc.nextInt() l[1][i] l[1] l 1 i sc.nextInt() sc.nextInt sc ans += l[1][i] ans l[1][i] l[1] l 1 i ans += l[0][0] ans l[0][0] l[0] l 0 0 int a = ans; a ans for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        } {
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        } a = a-l[1][i-1]+l[0][i] a a-l[1][i-1]+l[0][i] a-l[1][i-1] a l[1][i-1] l[1] l 1 i-1 i 1 l[0][i] l[0] l 0 i ans = Math.max(ans, a) ans Math.max(ans, a) Math.max Math ans a System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        int[][] l = new int[2][N];
        int ans = 0;
        for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt();
        for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        }
        ans += l[0][0];
        int a = ans;
        for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        }
        System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        final int N = sc.nextInt();
        int[][] l = new int[2][N];
        int ans = 0;
        for(int i = 0;i < N;i++)    l[0][i] = sc.nextInt();
        for(int i = 0;i < N;i++){
            l[1][i] = sc.nextInt();
            ans += l[1][i];
        }
        ans += l[0][0];
        int a = ans;
        for(int i = 1;i < N;i++){
            a = a-l[1][i-1]+l[0][i];
            ans = Math.max(ans, a);
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

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