import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  }
} Main public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  } main {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] map=new int[3][n+1]; map new int[3][n+1] 3 n+1 n 1 int cnt=0; cnt 0 int max=0; max 0 for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt(); int i=1; int i=1; i 1 i<3 i 3 i++ i++ i for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt(); for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt(); int j=1; int j=1; j 1 j<=n j n j++ j++ j map[i][j]=sc.nextInt(); map[i][j]=sc.nextInt() map[i][j] map[i] map i j sc.nextInt() sc.nextInt sc int kari=map[1][1]; kari map[1][1] map[1] map 1 1 for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    } int tate=1; int tate=1; tate 1 tate<=n tate n tate++ tate++ tate {
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    } {
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    } cnt=1 cnt 1 for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      } int j=1; int j=1; j 1 j<=n j n j++ j++ j {
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      } {
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      } if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        } tate==j tate j {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        } cnt=2 cnt 2 if(tate!=1&&cnt==2) kari+=map[1][j]; tate!=1&&cnt==2 tate!=1 tate 1 cnt==2 cnt 2 kari+=map[1][j] kari map[1][j] map[1] map 1 j kari+=map[cnt][j] kari map[cnt][j] map[cnt] map cnt j if(kari>max) max=kari; kari>max kari max max=kari max kari kari=0 kari 0 if(max>kari) System.out.println(max);
    else System.out.println(kari); max>kari max kari System.out.println(max) System.out.println System.out System System.out max System.out.println(kari) System.out.println System.out System System.out kari String[] args args public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  }
} public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[][] map=new int[3][n+1];
    int cnt=0;
    int max=0;
    for(int i=1;i<3;i++)
      for(int j=1;j<=n;j++)
        map[i][j]=sc.nextInt();
    int kari=map[1][1];
    for(int tate=1;tate<=n;tate++){
      cnt=1;
      for(int j=1;j<=n;j++){
        if(tate==j) {
          cnt=2;
          if(tate!=1&&cnt==2) kari+=map[1][j];
        }
        kari+=map[cnt][j];
      }
      if(kari>max) max=kari;
      kari=0;
    }
    if(max>kari) System.out.println(max);
    else System.out.println(kari);
  }
}