import java.util.*;

class Main
{
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[][] arr = new int[2][n];

		for(int i =0;i<2;i++)
		{
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		}

		int[] sumarr = new int[n];
		int row =0 ;
		for(int i =0;i<n;i++)
		{
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		}

		Arrays.sort(sumarr);
		System.out.println(sumarr[n-1]);

	}
} import java.util.*; util.* java class Main
{
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[][] arr = new int[2][n];

		for(int i =0;i<2;i++)
		{
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		}

		int[] sumarr = new int[n];
		int row =0 ;
		for(int i =0;i<n;i++)
		{
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		}

		Arrays.sort(sumarr);
		System.out.println(sumarr[n-1]);

	}
} Main public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[][] arr = new int[2][n];

		for(int i =0;i<2;i++)
		{
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		}

		int[] sumarr = new int[n];
		int row =0 ;
		for(int i =0;i<n;i++)
		{
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		}

		Arrays.sort(sumarr);
		System.out.println(sumarr[n-1]);

	} main {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[][] arr = new int[2][n];

		for(int i =0;i<2;i++)
		{
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		}

		int[] sumarr = new int[n];
		int row =0 ;
		for(int i =0;i<n;i++)
		{
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		}

		Arrays.sort(sumarr);
		System.out.println(sumarr[n-1]);

	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int[][] arr = new int[2][n]; arr new int[2][n] 2 n for(int i =0;i<2;i++)
		{
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		} int i =0; int i =0; i 0 i<2 i 2 i++ i++ i {
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		} {
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		} for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			} int j =0; int j =0; j 0 j<n j n j++ j++ j {
				arr[i][j] = s.nextInt();
			} {
				arr[i][j] = s.nextInt();
			} arr[i][j] = s.nextInt() arr[i][j] arr[i] arr i j s.nextInt() s.nextInt s int[] sumarr = new int[n]; sumarr new int[n] n int row =0 ; row 0 for(int i =0;i<n;i++)
		{
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		} int i =0; int i =0; i 0 i<n i n i++ i++ i {
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		} {
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		} int sum =0 ; sum 0 row =0 row 0 for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			} int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			} {
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			} if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				} j == i j i {
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				} sum+=arr[row][j] sum arr[row][j] arr[row] arr row j row++ row sum+=arr[row][j] sum arr[row][j] arr[row] arr row j {
					sum+=arr[row][j];
				} sum+=arr[row][j] sum arr[row][j] arr[row] arr row j sumarr[i] = sum sumarr[i] sumarr i sum Arrays.sort(sumarr) Arrays.sort Arrays sumarr System.out.println(sumarr[n-1]) System.out.println System.out System System.out sumarr[n-1] sumarr n-1 n 1 String[] args args
import java.util.*;

class Main
{
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[][] arr = new int[2][n];

		for(int i =0;i<2;i++)
		{
			for(int j =0;j<n;j++)
			{
				arr[i][j] = s.nextInt();
			}
		}

		int[] sumarr = new int[n];
		int row =0 ;
		for(int i =0;i<n;i++)
		{
			int sum =0 ;
			row =0 ;
			for(int j = 0;j<n;j++)//1)start from 0 index of first row
			{
				if(j == i)//3)then horizontal  sum for row = 1;
				{
					sum+=arr[row][j];
					row++;
					sum+=arr[row][j];
					
				}
				else//2) sum until j != i i.e horizontal sum  for row =0 ;
				{
					sum+=arr[row][j];
				}
			}
			// System.out.println(sum);
			sumarr[i] = sum;
		}

		Arrays.sort(sumarr);
		System.out.println(sumarr[n-1]);

	}
}