import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    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.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    System.out.println(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String[] s1 = sc.nextLine().split(" "); s1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " String[] s2 = sc.nextLine().split(" "); s2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int[][] m = new int[2][N]; m new int[2][N] 2 N for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    } {
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    } m[0][i] = Integer.parseInt(s1[i]) m[0][i] m[0] m 0 i Integer.parseInt(s1[i]) Integer.parseInt Integer s1[i] s1 i m[1][i] = Integer.parseInt(s2[i]) m[1][i] m[1] m 1 i Integer.parseInt(s2[i]) Integer.parseInt Integer s2[i] s2 i int max = 0; max 0 for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    } {
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    } int n = 0; n 0 int s = 0; s 0 for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      } {
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      } n += m[s][j] n m[s][j] m[s] m s j if(j == i){
          s++;
          n += m[s][j];
        } j == i j i {
          s++;
          n += m[s][j];
        } s++ s n += m[s][j] n m[s][j] m[s] m s j if(n > max){
        max = n;
      } n > max n max {
        max = n;
      } max = n max n 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.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    System.out.println(max);
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    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.nextLine());
    String[] s1 = sc.nextLine().split(" ");
    String[] s2 = sc.nextLine().split(" ");
    int[][] m = new int[2][N];
    for(int i = 0; i < N; i++){
      m[0][i] = Integer.parseInt(s1[i]);
      m[1][i] = Integer.parseInt(s2[i]);
    }
    
    int max = 0;
    for(int i = 0; i < N; i++){
      int n = 0;
      int s = 0;
      for(int j = 0; j < N; j++){
        n += m[s][j];
        if(j == i){
          s++;
          n += m[s][j];
        }
      }
      if(n > max){
        max = n;
      }
    }
    System.out.println(max);
  }
}