import java.util.* ;

public class Main {
	
	public static void main( String[] args ) {
		
		Scanner sc			= new Scanner( System.in ) ;
		int		N			= sc.nextInt();
		int		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	}
} 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		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	}
} Main public static void main( String[] args ) {
		
		Scanner sc			= new Scanner( System.in ) ;
		int		N			= sc.nextInt();
		int		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	} main {
		
		Scanner sc			= new Scanner( System.in ) ;
		int		N			= sc.nextInt();
		int		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	} Scanner sc			= new Scanner( System.in ) ; sc new Scanner( System.in ) int		N			= sc.nextInt(); N sc.nextInt() sc.nextInt sc int		field[][]	= new int[2][N]; field new int[2][N] 2 N for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		} {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		} for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
				field[i][j] = sc.nextInt();
			} {
				field[i][j] = sc.nextInt();
			} field[i][j] = sc.nextInt() field[i][j] field[i] field i j sc.nextInt() sc.nextInt sc field[1][0] += field[0][0] field[1][0] field[1] field 1 0 field[0][0] field[0] field 0 0 for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		} int j = 1; int j = 1; j 1 j < N j N j++ j++ j {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		} {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		} field[0][j] += field[0][j-1] field[0][j] field[0] field 0 j field[0][j-1] field[0] field 0 j-1 j 1 field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] field[1][j] field[1] field 1 j field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] field[0][j] < field[1][j-1] field[0][j] field[0] field 0 j field[1][j-1] field[1] field 1 j-1 j 1 field[1][j-1] field[1] field 1 j-1 j 1 field[0][j] field[0] field 0 j System.out.println( field[1][N-1] ) System.out.println System.out System System.out field[1][N-1] field[1] field 1 N-1 N 1 String[] args args public class Main {
	
	public static void main( String[] args ) {
		
		Scanner sc			= new Scanner( System.in ) ;
		int		N			= sc.nextInt();
		int		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	}
} public class Main {
	
	public static void main( String[] args ) {
		
		Scanner sc			= new Scanner( System.in ) ;
		int		N			= sc.nextInt();
		int		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	}
} Main
import java.util.* ;

public class Main {
	
	public static void main( String[] args ) {
		
		Scanner sc			= new Scanner( System.in ) ;
		int		N			= sc.nextInt();
		int		field[][]	= new int[2][N];
		
		for( int i = 0; i < 2; i++ ) {
			for( int j = 0; j < N; j++ ) {
				field[i][j] = sc.nextInt();
			}
		}
		
		field[1][0] += field[0][0] ;
		
		for( int j = 1; j < N; j++ ) {
			field[0][j] += field[0][j-1] ;
			field[1][j] += field[0][j] < field[1][j-1] ? field[1][j-1] : field[0][j] ;
		}
		
		System.out.println( field[1][N-1] ) ;
	}
}
