import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    } main {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String str_raw1[] = br.readLine().split(" "); str_raw1 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " String str_raw2[] = br.readLine().split(" "); str_raw2 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] raw1 = new int[n]; raw1 new int[n] n int[] raw2 = new int[n]; raw2 new int[n] n for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        } {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        } raw1[i] = Integer.parseInt(str_raw1[i]) raw1[i] raw1 i Integer.parseInt(str_raw1[i]) Integer.parseInt Integer str_raw1[i] str_raw1 i raw2[i] = Integer.parseInt(str_raw2[i]) raw2[i] raw2 i Integer.parseInt(str_raw2[i]) Integer.parseInt Integer str_raw2[i] str_raw2 i int[] sums = new int[n]; sums new int[n] n int max = -1; max -1 1 for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        } {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        } sums[i] = 0 sums[i] sums i 0 for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                sums[i] += raw1[j];
            } {
                sums[i] += raw1[j];
            } sums[i] += raw1[j] sums[i] sums i raw1[j] raw1 j for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            } int k = i; int k = i; k i k < n k n k++ k++ k {
                sums[i] += raw2[k];
            } {
                sums[i] += raw2[k];
            } sums[i] += raw2[k] sums[i] sums i raw2[k] raw2 k max = Math.max(sums[i], max) max Math.max(sums[i], max) Math.max Math sums[i] sums i max 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 {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String str_raw1[] = br.readLine().split(" ");
        String str_raw2[] = br.readLine().split(" ");
        int[] raw1 = new int[n];
        int[] raw2 = new int[n];
        for (int i = 0; i < n; i++) {
            raw1[i] = Integer.parseInt(str_raw1[i]);
            raw2[i] = Integer.parseInt(str_raw2[i]);
        }
        
        int[] sums = new int[n];
        int max = -1;
        for (int i = 0; i < n; i++) {
            sums[i] = 0;
            for (int j = 0; j <= i; j++) {
                sums[i] += raw1[j];
            }
            for (int k = i; k < n; k++) {
                sums[i] += raw2[k];
            }
            max = Math.max(sums[i], max);
        }
        
        System.out.println(max);
    }
}
