

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] candy = new int[2][N]; candy new int[2][N] 2 N for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			candy[0][i] = sc.nextInt();
		} {
			candy[0][i] = sc.nextInt();
		} candy[0][i] = sc.nextInt() candy[0][i] candy[0] candy 0 i sc.nextInt() sc.nextInt sc for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			candy[1][i] = sc.nextInt();
		} {
			candy[1][i] = sc.nextInt();
		} candy[1][i] = sc.nextInt() candy[1][i] candy[1] candy 1 i sc.nextInt() sc.nextInt sc int havecandy; havecandy int firstlinecandy = candy[0][0]; firstlinecandy candy[0][0] candy[0] candy 0 0 int secondlinecandy = 0; secondlinecandy 0 for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			secondlinecandy += candy[1][i];
		} {
			secondlinecandy += candy[1][i];
		} secondlinecandy += candy[1][i] secondlinecandy candy[1][i] candy[1] candy 1 i havecandy = firstlinecandy + secondlinecandy havecandy firstlinecandy + secondlinecandy firstlinecandy secondlinecandy for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		} {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		} firstlinecandy += candy[0][i] firstlinecandy candy[0][i] candy[0] candy 0 i secondlinecandy -= candy[1][i - 1] secondlinecandy candy[1][i - 1] candy[1] candy 1 i - 1 i 1 havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy) havecandy Integer.max(havecandy, firstlinecandy + secondlinecandy) Integer.max Integer havecandy firstlinecandy + secondlinecandy firstlinecandy secondlinecandy System.out.println(havecandy) System.out.println System.out System System.out havecandy String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candy = new int[2][N];
		for(int i = 0; i < N; i++) {
			candy[0][i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			candy[1][i] = sc.nextInt();
		}
		int havecandy;
		int firstlinecandy = candy[0][0];
		int secondlinecandy = 0;
		for(int i = 0; i < N; i++) {
			secondlinecandy += candy[1][i];
		}
		havecandy = firstlinecandy + secondlinecandy;
		for(int i = 1; i < N; i++) {
			firstlinecandy += candy[0][i];
			secondlinecandy -= candy[1][i - 1];
			havecandy = Integer.max(havecandy, firstlinecandy + secondlinecandy);
		}
		System.out.println(havecandy);
	}

}
