import java.util.*;
public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      System.out.println(max);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} 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[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      System.out.println(max);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      System.out.println(max);
    } main {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      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[n]; a new int[n] n int[] b = new int[n]; b new int[n] n for(int i = 0;i < n;i++)a[i]=sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i]=sc.nextInt(); a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int i = 0;i < n;i++)b[i]=sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i b[i]=sc.nextInt(); b[i]=sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc int[] cnt = new int[n]; cnt new int[n] n int max = 0; max 0 for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      } {
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      } for(int j = 0;j <= i;j++)cnt[i]+=a[j]; int j = 0; int j = 0; j 0 j <= i j i j++ j++ j cnt[i]+=a[j]; cnt[i]+=a[j] cnt[i] cnt i a[j] a j for(int j = i;j < n;j++)cnt[i]+=b[j]; int j = i; int j = i; j i j < n j n j++ j++ j cnt[i]+=b[j]; cnt[i]+=b[j] cnt[i] cnt i b[j] b j max = Math.max(max,cnt[i]) max Math.max(max,cnt[i]) Math.max Math max cnt[i] cnt i System.out.println(max) System.out.println System.out System System.out max String[] args args public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    } lcm {
      return x*y/gcd(x,y);
    } return x*y/gcd(x,y); x*y/gcd(x,y) x*y x y gcd(x,y) gcd x y int x x int y y public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    } gcd {
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    } if(x < y)return gcd(y,x); x < y x y return gcd(y,x); gcd(y,x) gcd y x if(y==0)return x; y==0 y 0 return x; x return gcd(y,x%y); gcd(y,x%y) gcd y x%y x y int x x int y y public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      System.out.println(max);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      System.out.println(max);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} Main
import java.util.*;
public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int[] a = new int[n];
      int[] b = new int[n];
      for(int i = 0;i < n;i++)a[i]=sc.nextInt();
      for(int i = 0;i < n;i++)b[i]=sc.nextInt();
      int[] cnt = new int[n];
      int max = 0;
      for(int i = 0;i < n;i++){
      	for(int j = 0;j <= i;j++)cnt[i]+=a[j];
        for(int j = i;j < n;j++)cnt[i]+=b[j];
        max = Math.max(max,cnt[i]);
      }
      System.out.println(max);
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
}