import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
}
} import java.util.Scanner; Scanner java.util public class Main{
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
}
} Main public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
} main {
Scanner stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int N=stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int A[][]=new int[2][N]; A new int[2][N] 2 N int z=0 z 0 y=0 y 0 max=0 max 0 plus=0; plus 0 while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  } y<2 y 2 {
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  } A[y][z]=stdIn.nextInt() A[y][z] A[y] A y z stdIn.nextInt() stdIn.nextInt stdIn z++ z if(z==N){
    z=0;y++;
    } z==N z N {
    z=0;y++;
    } z=0 z 0 y++ y z=0 z 0 y=0 y 0 plus+=A[0][0] plus A[0][0] A[0] A 0 0 while(z<N){
  plus+=A[1][z];
    z++;
  } z<N z N {
  plus+=A[1][z];
    z++;
  } plus+=A[1][z] plus A[1][z] A[1] A 1 z z++ z z=0 z 0 max=plus max plus while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  } z<N-1 z N-1 N 1 {
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  } plus-=A[1][z] plus A[1][z] A[1] A 1 z plus+=A[0][z+1] plus A[0][z+1] A[0] A 0 z+1 z 1 if(plus>max)
      max=plus; plus>max plus max max=plus max plus z++ z 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 stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
}
} public class Main{
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
}
} Main
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
  int N=stdIn.nextInt();
  int A[][]=new int[2][N];
  int z=0,y=0,max=0,plus=0;
  while(y<2){
  A[y][z]=stdIn.nextInt();
    z++;
    if(z==N){
    z=0;y++;
    }
  }z=0;y=0;
  plus+=A[0][0];
  while(z<N){
  plus+=A[1][z];
    z++;
  }z=0;max=plus;
  while(z<N-1){
  plus-=A[1][z];
    plus+=A[0][z+1];
    if(plus>max)
      max=plus;
    z++;
  }
  System.out.println(max);
}
}