import java.util.*;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    }
} import java.util.*; util.* java import java.util.stream.Stream; Stream java.util.stream public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    } main {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cnt = sc.nextInt(); cnt sc.nextInt() sc.nextInt sc int[] a = new int[cnt]; a new int[cnt] cnt int[] b = new int[cnt]; b new int[cnt] cnt for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < cnt i cnt i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < cnt i cnt i++ i++ i {
            b[i] = sc.nextInt();
        } {
            b[i] = sc.nextInt();
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc int[] sum = new int[cnt]; sum new int[cnt] cnt int k = 0; k 0 for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        } int i = 0; int i = 0; i 0 i < cnt i cnt i++ i++ i {
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        } {
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        } sum[i] += k sum[i] sum i k sum[i] += a[i] sum[i] sum i a[i] a i for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            } int j = i; int j = i; j i j < cnt j cnt j++ j++ j {
                sum[i] += b[j];
            } {
                sum[i] += b[j];
            } sum[i] += b[j] sum[i] sum i b[j] b j k += a[i] k a[i] a i int max = sum[0]; max sum[0] sum 0 for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        } int i = 0; int i = 0; i 0 i < sum.length i sum.length sum sum.length i++ i++ i {
            max = Math.max(max, sum[i]);
        } {
            max = Math.max(max, sum[i]);
        } max = Math.max(max, sum[i]) max Math.max(max, sum[i]) Math.max Math max sum[i] sum i 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) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    }
} Main
import java.util.*;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();
        int[] a = new int[cnt];
        int[] b = new int[cnt];
        for(int i = 0; i < cnt; i++){
            a[i] = sc.nextInt();
        }
        for(int i = 0; i < cnt; i++){
            b[i] = sc.nextInt();
        }
        int[] sum = new int[cnt];
        int k = 0;
        for(int i = 0; i < cnt; i++){
            sum[i] += k;
            sum[i] += a[i];
            for(int j = i; j < cnt; j++){
                sum[i] += b[j];
            }
            k += a[i];
        }
        int max = sum[0];
        for(int i = 0; i < sum.length; i++){
            max = Math.max(max, sum[i]);
        }
        System.out.println(max);
    }
}