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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        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+1]; raw1 new int[n+1] n+1 n 1 int[] raw2 = new int[n+1]; raw2 new int[n+1] n+1 n 1 raw1[0] = 0 raw1[0] raw1 0 0 raw2[0] = 0 raw2[0] raw2 0 0 for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        } {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        } raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]) raw1[i] raw1 i raw1[i-1] + Integer.parseInt(str_raw1[i-1]) raw1[i-1] raw1 i-1 i 1 Integer.parseInt(str_raw1[i-1]) Integer.parseInt Integer str_raw1[i-1] str_raw1 i-1 i 1 raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]) raw2[i] raw2 i raw2[i-1] + Integer.parseInt(str_raw2[i-1]) raw2[i-1] raw2 i-1 i 1 Integer.parseInt(str_raw2[i-1]) Integer.parseInt Integer str_raw2[i-1] str_raw2 i-1 i 1 int max = -1 max -1 1 temp = 0; temp 0 for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        } {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        } temp = raw1[i] + (raw2[n] - raw2[i-1]) temp raw1[i] + (raw2[n] - raw2[i-1]) raw1[i] raw1 i (raw2[n] - raw2[i-1]) raw2[n] raw2 n raw2[i-1] raw2 i-1 i 1 max = Math.max(max, temp) max Math.max(max, temp) Math.max Math max temp 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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        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+1];
        int[] raw2 = new int[n+1];
        raw1[0] = 0;
        raw2[0] = 0;
        for (int i = 1; i <= n; i++) {
            raw1[i] = raw1[i-1] + Integer.parseInt(str_raw1[i-1]);
            raw2[i] = raw2[i-1] + Integer.parseInt(str_raw2[i-1]);
        }
        
        int max = -1, temp = 0;
        for (int i = 1; i <= n; i++) {
            temp = raw1[i] + (raw2[n] - raw2[i-1]);
            max = Math.max(max, temp);
        }
        
        
        System.out.println(max);
    }
}
