import java.util.*;

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

class Main { 
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[][] a = new int[2][n];
      for(int i = 0; i < 2; i++){
          for(int j = 0; j < n; j++){
              a[i][j] = sc.nextInt();
          }
      }
      
      int maxCnt = 0;
      for(int i = 0; i < n; i ++){
          int tmp = 0;
          for(int j = 0; j <= i; j++){
              tmp = tmp + a[0][j];
          }
          for(int k = i; k < n; k++){
              tmp = tmp + a[1][k];
          }
          
          if(tmp > maxCnt) {
              maxCnt = tmp;
          }
      }
      
      System.out.println(maxCnt);
  }  
}