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