import java.util.*;
public class Main {
      public static void main(String[]args) {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      }
} import java.util.*; util.* java public class Main {
      public static void main(String[]args) {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      }
} Main public static void main(String[]args) {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      } main {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      } int sum=0; sum 0 Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int column=scan.nextInt(); column scan.nextInt() scan.nextInt scan int[][] nums=new int[2][column]; nums new int[2][column] 2 column for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  } int row=0; int row=0; row 0 row<2 row 2 row++ row++ row {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  } {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  } for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  } int co=0; int co=0; co 0 co<column co column co++ co++ co {
    		  nums[row][co]=scan.nextInt();
    		  } {
    		  nums[row][co]=scan.nextInt();
    		  } nums[row][co]=scan.nextInt() nums[row][co] nums[row] nums row co scan.nextInt() scan.nextInt scan for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  } int i=0; int i=0; i 0 i<column i column i++ i++ i {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  } {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  } int solve=0; solve 0 int j j k; k for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  } j=0; j=0 j 0 j<=i j i j++ j++ j {
    			  solve+=nums[0][j];
    		  } {
    			  solve+=nums[0][j];
    		  } solve+=nums[0][j] solve nums[0][j] nums[0] nums 0 j for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  } k=i; k=i k i k<column k column k++ k++ k {
    			  solve+=nums[1][k];
    		  } {
    			  solve+=nums[1][k];
    		  } solve+=nums[1][k] solve nums[1][k] nums[1] nums 1 k if(solve>sum) {
    			  sum=solve;
    		  } solve>sum solve sum {
    			  sum=solve;
    		  } sum=solve sum solve System.out.println(sum) System.out.println System.out System System.out sum String[]args args public class Main {
      public static void main(String[]args) {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      }
} public class Main {
      public static void main(String[]args) {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      }
} Main
import java.util.*;
public class Main {
      public static void main(String[]args) {
    	  int sum=0;
    	  Scanner scan=new Scanner(System.in);
    	  int column=scan.nextInt();
    	  int[][] nums=new int[2][column];
    	  for(int row=0;row<2;row++) {
    		  for(int co=0;co<column;co++) {
    		  nums[row][co]=scan.nextInt();
    		  }
    	  }
    	  for(int i=0;i<column;i++) {
    		  int solve=0;
    		  int j,k;
    		  for(j=0;j<=i;j++) {
    			  solve+=nums[0][j];
    		  }
    		  for(k=i;k<column;k++) {
    			  solve+=nums[1][k];
    		  }
    		  if(solve>sum) {
    			  sum=solve;
    		  }
    	  }
    	  System.out.println(sum);
      }
}
