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[3][N+1];
    for(int row=1; row<=2;row++){
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    }
    int[][] record = new int[3][N+2];
    for(int col=N;col>=1;col--){
      record[2][col] = A[2][col] + record[2][col+1];
    }
    for(int col=1;col<=N;col++){
      record[1][col] = record[1][col-1] + A[1][col];
    }
    int max = Integer.MIN_VALUE;
    for(int i=1;i<=N;i++){
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    }
    System.out.println(max);
  }
} 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[3][N+1];
    for(int row=1; row<=2;row++){
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    }
    int[][] record = new int[3][N+2];
    for(int col=N;col>=1;col--){
      record[2][col] = A[2][col] + record[2][col+1];
    }
    for(int col=1;col<=N;col++){
      record[1][col] = record[1][col-1] + A[1][col];
    }
    int max = Integer.MIN_VALUE;
    for(int i=1;i<=N;i++){
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[][] A = new int[3][N+1];
    for(int row=1; row<=2;row++){
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    }
    int[][] record = new int[3][N+2];
    for(int col=N;col>=1;col--){
      record[2][col] = A[2][col] + record[2][col+1];
    }
    for(int col=1;col<=N;col++){
      record[1][col] = record[1][col-1] + A[1][col];
    }
    int max = Integer.MIN_VALUE;
    for(int i=1;i<=N;i++){
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[][] A = new int[3][N+1];
    for(int row=1; row<=2;row++){
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    }
    int[][] record = new int[3][N+2];
    for(int col=N;col>=1;col--){
      record[2][col] = A[2][col] + record[2][col+1];
    }
    for(int col=1;col<=N;col++){
      record[1][col] = record[1][col-1] + A[1][col];
    }
    int max = Integer.MIN_VALUE;
    for(int i=1;i<=N;i++){
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    }
    System.out.println(max);
  } 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[3][N+1]; A new int[3][N+1] 3 N+1 N 1 for(int row=1; row<=2;row++){
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    } int row=1; int row=1; row 1 row<=2 row 2 row++ row++ row {
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    } {
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    } for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      } int col=1; int col=1; col 1 col<=N col N col++ col++ col {
        A[row][col] = sc.nextInt();
      } {
        A[row][col] = sc.nextInt();
      } A[row][col] = sc.nextInt() A[row][col] A[row] A row col sc.nextInt() sc.nextInt sc int[][] record = new int[3][N+2]; record new int[3][N+2] 3 N+2 N 2 for(int col=N;col>=1;col--){
      record[2][col] = A[2][col] + record[2][col+1];
    } int col=N; int col=N; col N col>=1 col 1 col-- col-- col {
      record[2][col] = A[2][col] + record[2][col+1];
    } {
      record[2][col] = A[2][col] + record[2][col+1];
    } record[2][col] = A[2][col] + record[2][col+1] record[2][col] record[2] record 2 col A[2][col] + record[2][col+1] A[2][col] A[2] A 2 col record[2][col+1] record[2] record 2 col+1 col 1 for(int col=1;col<=N;col++){
      record[1][col] = record[1][col-1] + A[1][col];
    } int col=1; int col=1; col 1 col<=N col N col++ col++ col {
      record[1][col] = record[1][col-1] + A[1][col];
    } {
      record[1][col] = record[1][col-1] + A[1][col];
    } record[1][col] = record[1][col-1] + A[1][col] record[1][col] record[1] record 1 col record[1][col-1] + A[1][col] record[1][col-1] record[1] record 1 col-1 col 1 A[1][col] A[1] A 1 col int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE for(int i=1;i<=N;i++){
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    } {
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    } int cur = record[1][i]+record[2][i]; cur record[1][i]+record[2][i] record[1][i] record[1] record 1 i record[2][i] record[2] record 2 i max = Math.max(cur,max) max Math.max(cur,max) Math.max Math cur max System.out.println(max) System.out.println System.out System System.out max 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[3][N+1];
    for(int row=1; row<=2;row++){
      for(int col=1;col<=N;col++){
        A[row][col] = sc.nextInt();
      }
    }
    int[][] record = new int[3][N+2];
    for(int col=N;col>=1;col--){
      record[2][col] = A[2][col] + record[2][col+1];
    }
    for(int col=1;col<=N;col++){
      record[1][col] = record[1][col-1] + A[1][col];
    }
    int max = Integer.MIN_VALUE;
    for(int i=1;i<=N;i++){
      int cur = record[1][i]+record[2][i];
      max = Math.max(cur,max);
    }
    System.out.println(max);
  }
}
