import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int i = 0; i 0 int[][] ar; ar ar = new int[2][] ar new int[2][] 2 while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		} sc.hasNextLine() sc.hasNextLine sc {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		} String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String[] sr = s.split(" "); sr s.split(" ") s.split s " " int[] sri = new int[sr.length]; sri new int[sr.length] sr.length sr sr.length for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    } int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
			    sri[j] = Integer.parseInt(sr[j]);
		    } {
			    sri[j] = Integer.parseInt(sr[j]);
		    } sri[j] = Integer.parseInt(sr[j]) sri[j] sri j Integer.parseInt(sr[j]) Integer.parseInt Integer sr[j] sr j ar[i] = sri ar[i] ar i sri i++ i ArrayList<Integer> arrayList = new ArrayList<Integer>(); arrayList new ArrayList<Integer>() for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		} int ii = 0; int ii = 0; ii 0 ii < ar[0].length ii ar[0].length ar[0] ar 0 ar[0].length ii++ ii++ ii {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		} {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		} int count = 0; count 0 for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			} int j = 0; int j = 0; j 0 j<ar[0].length j ar[0].length ar[0] ar 0 ar[0].length j++ j++ j {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			} {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			} if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				} ii == j ii j {
					count += ar[0][j] + ar[1][j];
				} count += ar[0][j] + ar[1][j] count ar[0][j] + ar[1][j] ar[0][j] ar[0] ar 0 j ar[1][j] ar[1] ar 1 j if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				} ii > j ii j {
					count += ar[0][j];
				} count += ar[0][j] count ar[0][j] ar[0] ar 0 j if (ii < j) {
					count += ar[1][j];
				} ii < j ii j {
					count += ar[1][j];
				} count += ar[1][j] count ar[1][j] ar[1] ar 1 j arrayList.add(count) arrayList.add arrayList count int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList); result (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList) (Collections.max(arrayList)<0) Collections.max(arrayList) Collections.max Collections arrayList 0 0 Collections.max(arrayList) Collections.max Collections arrayList System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int i = 0;
		int[][] ar;
		ar = new int[2][];
		while (sc.hasNextLine()) {
		    String s = sc.nextLine();
		    String[] sr = s.split(" ");
		    int[] sri = new int[sr.length];
		    for(int j = 0; j<n ; j++) {
			    sri[j] = Integer.parseInt(sr[j]);
		    }
		    ar[i] = sri;
		    i++;
		}

		ArrayList<Integer> arrayList = new ArrayList<Integer>();

		for(int ii = 0; ii < ar[0].length ; ii++) {
			int count = 0;
			for(int j = 0; j<ar[0].length ; j++) {
				if(ii == j) {
					count += ar[0][j] + ar[1][j];
				} else if (ii > j) {
					count += ar[0][j];
				} else if (ii < j) {
					count += ar[1][j];
				}
			}
			arrayList.add(count);
//			System.out.println(count);
		}

		int result = (Collections.max(arrayList)<0)? 0 : Collections.max(arrayList);
		// 出力
		System.out.println(result);
	}
}