import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    }

} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    }

} Main public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    } main {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = Integer.parseInt(scan.nextLine()); n Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan String[] a1 = scan.nextLine().split(" "); a1 scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " String[] a2 = scan.nextLine().split(" "); a2 scan.nextLine().split(" ") scan.nextLine().split scan.nextLine() scan.nextLine scan " " int max = 0; max 0 for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        } {
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        } int cnt = 0; cnt 0 for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            } int j=0; int j=0; j 0 j<=i j i j++ j++ j {
                cnt += Integer.parseInt(a1[j]);
            } {
                cnt += Integer.parseInt(a1[j]);
            } cnt += Integer.parseInt(a1[j]) cnt Integer.parseInt(a1[j]) Integer.parseInt Integer a1[j] a1 j for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            } int j=i; int j=i; j i j<n j n j++ j++ j {
                cnt += Integer.parseInt(a2[j]);
            } {
                cnt += Integer.parseInt(a2[j]);
            } cnt += Integer.parseInt(a2[j]) cnt Integer.parseInt(a2[j]) Integer.parseInt Integer a2[j] a2 j if(cnt > max) max = cnt; cnt > max cnt max max = cnt max cnt System.out.println(max) System.out.println System.out System System.out max scan.close() scan.close scan String[] args args public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    }

} public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    }

} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.nextLine());
        String[] a1 = scan.nextLine().split(" ");
        String[] a2 = scan.nextLine().split(" ");

        int max = 0;
        for(int i=0; i<n; i++){
            int cnt = 0;
            for(int j=0; j<=i; j++){
                cnt += Integer.parseInt(a1[j]);
            }
            for(int j=i; j<n; j++){
                cnt += Integer.parseInt(a2[j]);
            }
            if(cnt > max) max = cnt;
        }

        System.out.println(max);

        scan.close();
    
    }

}