import java.io.InputStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	}

	private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	}
} import java.io.InputStream; InputStream java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	}

	private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	}
} Main public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	} main {
		InputStream is = System.in;
		solve(is);
	} InputStream is = System.in; is System.in System System.in solve(is) solve is String[] args args private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	} solve {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	} try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		} {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		} Scanner cin = new Scanner(is) Scanner cin = new Scanner(is) new Scanner(is) int n = cin.nextInt(); n cin.nextInt() cin.nextInt cin 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] = cin.nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				a[i] = cin.nextInt();
			} {
				a[i] = cin.nextInt();
			} a[i] = cin.nextInt() a[i] a i cin.nextInt() cin.nextInt cin for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				b[i] = cin.nextInt();
			} {
				b[i] = cin.nextInt();
			} b[i] = cin.nextInt() b[i] b i cin.nextInt() cin.nextInt cin int ans = 0; ans 0 int candy = 0; candy 0 for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			} int x = 0; int x = 0; x 0 x < n x n x++ x++ x {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			} {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			} for (int i = 0; i <= x; i++) {
					candy += a[i];
				} int i = 0; int i = 0; i 0 i <= x i x i++ i++ i {
					candy += a[i];
				} {
					candy += a[i];
				} candy += a[i] candy a[i] a i for (int i = x; i < n; i++) {
					candy += b[i];
				} int i = x; int i = x; i x i < n i n i++ i++ i {
					candy += b[i];
				} {
					candy += b[i];
				} candy += b[i] candy b[i] b i ans = ans > candy ? ans : candy ans ans > candy ? ans : candy ans > candy ans candy ans candy candy = 0 candy 0 System.out.println(ans) System.out.println System.out System System.out ans InputStream is is public class Main {
	public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	}

	private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	}

	private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	}
} Main
import java.io.InputStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	}

	private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int n = cin.nextInt();
			int[] a = new int[n];
			int[] b = new int[n];

			for (int i = 0; i < n; i++) {
				a[i] = cin.nextInt();
			}
			for (int i = 0; i < n; i++) {
				b[i] = cin.nextInt();
			}

			int ans = 0;
			int candy = 0;

			for (int x = 0; x < n; x++) {
				for (int i = 0; i <= x; i++) {
					candy += a[i];
				}
				for (int i = x; i < n; i++) {
					candy += b[i];
				}
				ans = ans > candy ? ans : candy;
				candy = 0;
			}

			System.out.println(ans);
		}
	}
}