import java.util.*; 

class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();

  		int[] a1=new int[n+1];
  		int[] a2=new int[n+1];
        a1[0]=0;
  		a2[0]=0;
		for(int c=1;c<n+1;c++){
    		a1[c]=a1[c-1]+sc.nextInt();
    	}
  		for(int c=1;c<n+1;c++){
    		a2[c]=a2[c-1]+sc.nextInt();
    	}
  		int max=0;
    
 	for(int d=1;d<n+1;d++){
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    }

    	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[] a1=new int[n+1];
  		int[] a2=new int[n+1];
        a1[0]=0;
  		a2[0]=0;
		for(int c=1;c<n+1;c++){
    		a1[c]=a1[c-1]+sc.nextInt();
    	}
  		for(int c=1;c<n+1;c++){
    		a2[c]=a2[c-1]+sc.nextInt();
    	}
  		int max=0;
    
 	for(int d=1;d<n+1;d++){
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    }

    	System.out.println(max);
    }
} Main public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();

  		int[] a1=new int[n+1];
  		int[] a2=new int[n+1];
        a1[0]=0;
  		a2[0]=0;
		for(int c=1;c<n+1;c++){
    		a1[c]=a1[c-1]+sc.nextInt();
    	}
  		for(int c=1;c<n+1;c++){
    		a2[c]=a2[c-1]+sc.nextInt();
    	}
  		int max=0;
    
 	for(int d=1;d<n+1;d++){
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    }

    	System.out.println(max);
    } main {
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();

  		int[] a1=new int[n+1];
  		int[] a2=new int[n+1];
        a1[0]=0;
  		a2[0]=0;
		for(int c=1;c<n+1;c++){
    		a1[c]=a1[c-1]+sc.nextInt();
    	}
  		for(int c=1;c<n+1;c++){
    		a2[c]=a2[c-1]+sc.nextInt();
    	}
  		int max=0;
    
 	for(int d=1;d<n+1;d++){
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    }

    	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[] a1=new int[n+1]; a1 new int[n+1] n+1 n 1 int[] a2=new int[n+1]; a2 new int[n+1] n+1 n 1 a1[0]=0 a1[0] a1 0 0 a2[0]=0 a2[0] a2 0 0 for(int c=1;c<n+1;c++){
    		a1[c]=a1[c-1]+sc.nextInt();
    	} int c=1; int c=1; c 1 c<n+1 c n+1 n 1 c++ c++ c {
    		a1[c]=a1[c-1]+sc.nextInt();
    	} {
    		a1[c]=a1[c-1]+sc.nextInt();
    	} a1[c]=a1[c-1]+sc.nextInt() a1[c] a1 c a1[c-1]+sc.nextInt() a1[c-1] a1 c-1 c 1 sc.nextInt() sc.nextInt sc for(int c=1;c<n+1;c++){
    		a2[c]=a2[c-1]+sc.nextInt();
    	} int c=1; int c=1; c 1 c<n+1 c n+1 n 1 c++ c++ c {
    		a2[c]=a2[c-1]+sc.nextInt();
    	} {
    		a2[c]=a2[c-1]+sc.nextInt();
    	} a2[c]=a2[c-1]+sc.nextInt() a2[c] a2 c a2[c-1]+sc.nextInt() a2[c-1] a2 c-1 c 1 sc.nextInt() sc.nextInt sc int max=0; max 0 for(int d=1;d<n+1;d++){
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    } int d=1; int d=1; d 1 d<n+1 d n+1 n 1 d++ d++ d {
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    } {
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    } max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]) max Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]) Math.max Math max a1[d]-a1[0]+a2[n]-a2[d-1] a1[d]-a1[0]+a2[n] a1[d]-a1[0] a1[d] a1 d a1[0] a1 0 a2[n] a2 n a2[d-1] a2 d-1 d 1 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[] a1=new int[n+1];
  		int[] a2=new int[n+1];
        a1[0]=0;
  		a2[0]=0;
		for(int c=1;c<n+1;c++){
    		a1[c]=a1[c-1]+sc.nextInt();
    	}
  		for(int c=1;c<n+1;c++){
    		a2[c]=a2[c-1]+sc.nextInt();
    	}
  		int max=0;
    
 	for(int d=1;d<n+1;d++){
       max=Math.max(max,a1[d]-a1[0]+a2[n]-a2[d-1]);
    }

    	System.out.println(max);
    }
}
