import java.util.*;


public class Main {
    private static String queue = "";
    private static boolean finished = false;
    
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    }
} import java.util.*; util.* java public class Main {
    private static String queue = "";
    private static boolean finished = false;
    
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    }
} Main private static String queue = ""; queue "" private static boolean finished = false; finished false public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    } main {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int row = 2; row 2 int col = sc.nextInt(); col sc.nextInt() sc.nextInt sc int[][] candies = new int[row][col]; candies new int[row][col] row col for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        } int x = 0; int x = 0; x 0 x < row x row x++ x++ x {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        } {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        } for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            } int y = 0; int y = 0; y 0 y < col y col y++ y++ y {
                candies[x][y] = sc.nextInt();
            } {
                candies[x][y] = sc.nextInt();
            } candies[x][y] = sc.nextInt() candies[x][y] candies[x] candies x y sc.nextInt() sc.nextInt sc int maxCount = 0; maxCount 0 for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        } int i = 0; int i = 0; i 0 i < col i col i++ i++ i {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        } {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        } int count = 0; count 0 int x = 0; x 0 for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            } int y = 0; int y = 0; y 0 y < col y col y++ y++ y {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            } {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            } count += candies[x][y] count candies[x][y] candies[x] candies x y if (i == y) {
                    count += candies[++x][y];
                } i == y i y {
                    count += candies[++x][y];
                } count += candies[++x][y] count candies[++x][y] candies[++x] candies ++x x y maxCount = Math.max(maxCount, count) maxCount Math.max(maxCount, count) Math.max Math maxCount count System.out.println(maxCount) System.out.println System.out System System.out maxCount String[] args args public class Main {
    private static String queue = "";
    private static boolean finished = false;
    
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    }
} public class Main {
    private static String queue = "";
    private static boolean finished = false;
    
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    }
} Main
import java.util.*;


public class Main {
    private static String queue = "";
    private static boolean finished = false;
    
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int row = 2;
        int col = sc.nextInt();
        int[][] candies = new int[row][col];
        for (int x = 0; x < row; x++) {
            for (int y = 0; y < col; y++) {
                candies[x][y] = sc.nextInt();
            }
        }
        
        int maxCount = 0;
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            int x = 0;
            for (int y = 0; y < col; y++) {
                count += candies[x][y];
                if (i == y) {
                    count += candies[++x][y];
                }
            }
            
            maxCount = Math.max(maxCount, count);
        }
        
        System.out.println(maxCount);
    }
}