import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[][] a = new int[2][N]; a new int[2][N] 2 N for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        } {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        } for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                a[i][j] = Integer.parseInt(sc.next());
            } {
                a[i][j] = Integer.parseInt(sc.next());
            } a[i][j] = Integer.parseInt(sc.next()) a[i][j] a[i] a i j Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int max = 0; max 0 int sum = 0; sum 0 for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        } int k = 0; int k = 0; k 0 k < N k N k++ k++ k {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        } {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        } sum = 0 sum 0 int i = 0; i 0 for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            } {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            } if(k == j) {
                    sum += a[i][j];
                    i = 1;
                } k == j k j {
                    sum += a[i][j];
                    i = 1;
                } sum += a[i][j] sum a[i][j] a[i] a i j i = 1 i 1 sum += a[i][j] sum a[i][j] a[i] a i j if(sum > max) {
                max = sum;
            } sum > max sum max {
                max = sum;
            } max = sum max sum 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) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int[][] a = new int[2][N];
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < N; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        
        int max = 0;
        int sum = 0;
        for(int k = 0; k < N; k++) {
            sum = 0;
            int i = 0;
            for(int j = 0; j < N; j++) {
                if(k == j) {
                    sum += a[i][j];
                    i = 1;
                }
                sum += a[i][j];
            }
            if(sum > max) {
                max = sum;
            }
        }
        System.out.println(max);
        
    }
}