import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        System.out.println(max);
    }
} 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[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        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[][] array = new int[2][n]; array new int[2][n] 2 n int candySum = 0; candySum 0 for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                array[i][j] = sc.nextInt();
            } {
                array[i][j] = sc.nextInt();
            } array[i][j] = sc.nextInt() array[i][j] array[i] array i j sc.nextInt() sc.nextInt sc int i i j; j int max = 0; max 0 int t=n; t n for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        } ; t >= 0 t 0 t-- t-- t {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        } {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        } candySum = 0 candySum 0 for (i = 0; i < t; i++) {
                candySum += array[0][i];
            } i = 0; i = 0 i 0 i < t i t i++ i++ i {
                candySum += array[0][i];
            } {
                candySum += array[0][i];
            } candySum += array[0][i] candySum array[0][i] array[0] array 0 i if(i!=0) i-=1; i!=0 i 0 i-=1 i 1 for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            } j = i ; j = i j i j < n j n j++ j++ j {
                candySum += array[1][j];
             
            } {
                candySum += array[1][j];
             
            } candySum += array[1][j] candySum array[1][j] array[1] array 1 j if (candySum > max)
                max = candySum; candySum > max candySum max max = candySum max candySum 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[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        System.out.println(max);
    }
} 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[][] array = new int[2][n];
        int candySum = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = sc.nextInt();
            }
        }
        int i, j;
        int max = 0;
      int t=n;
        for (; t >= 0; t--) {
            candySum = 0;
            for (i = 0; i < t; i++) {
                candySum += array[0][i];
            }
          if(i!=0) i-=1;
            for (j = i ; j < n; j++) {
                candySum += array[1][j];
             
            }
            if (candySum > max)
                max = candySum;
        }
        System.out.println(max);
    }
}
