import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);

    //列の数
    int n = stdIn.nextInt();
    //各マスの飴の個数
    int[][] a = new int[2][n];
    for (int i = 0 ; i < 2 ; i++ ) {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    }

    //右下に向かって飴を取りながら進む、全パターン
    int sum = 0;
    int cmp = 0;

    for (int k = n ; k > 0 ; k-- ) {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    }

    System.out.println(sum);
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);

    //列の数
    int n = stdIn.nextInt();
    //各マスの飴の個数
    int[][] a = new int[2][n];
    for (int i = 0 ; i < 2 ; i++ ) {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    }

    //右下に向かって飴を取りながら進む、全パターン
    int sum = 0;
    int cmp = 0;

    for (int k = n ; k > 0 ; k-- ) {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    }

    System.out.println(sum);
  }
} Main public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);

    //列の数
    int n = stdIn.nextInt();
    //各マスの飴の個数
    int[][] a = new int[2][n];
    for (int i = 0 ; i < 2 ; i++ ) {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    }

    //右下に向かって飴を取りながら進む、全パターン
    int sum = 0;
    int cmp = 0;

    for (int k = n ; k > 0 ; k-- ) {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    }

    System.out.println(sum);
  } main {
    Scanner stdIn = new Scanner(System.in);

    //列の数
    int n = stdIn.nextInt();
    //各マスの飴の個数
    int[][] a = new int[2][n];
    for (int i = 0 ; i < 2 ; i++ ) {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    }

    //右下に向かって飴を取りながら進む、全パターン
    int sum = 0;
    int cmp = 0;

    for (int k = n ; k > 0 ; k-- ) {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    }

    System.out.println(sum);
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int[][] a = new int[2][n]; a new int[2][n] 2 n for (int i = 0 ; i < 2 ; i++ ) {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    } int i = 0 ; int i = 0 ; i 0 i < 2 i 2 i++ i++ i {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    } {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    } for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
        a[i][j] = stdIn.nextInt();
      } {
        a[i][j] = stdIn.nextInt();
      } a[i][j] = stdIn.nextInt() a[i][j] a[i] a i j stdIn.nextInt() stdIn.nextInt stdIn int sum = 0; sum 0 int cmp = 0; cmp 0 for (int k = n ; k > 0 ; k-- ) {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    } int k = n ; int k = n ; k n k > 0 k 0 k-- k-- k {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    } {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    } sum = 0 sum 0 for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      } int j = 0; int j = 0; j 0 j < k j k j++ j++ j {
        sum += a[0][j];
      } {
        sum += a[0][j];
      } sum += a[0][j] sum a[0][j] a[0] a 0 j for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      } int j = k - 1 ; int j = k - 1 ; j k - 1 k 1 j < n j n j++ j++ j {
        sum += a[1][j];
      } {
        sum += a[1][j];
      } sum += a[1][j] sum a[1][j] a[1] a 1 j if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      } sum >= cmp sum cmp {
        cmp = sum;
      } cmp = sum cmp sum {
        sum = cmp;
      } sum = cmp sum cmp System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);

    //列の数
    int n = stdIn.nextInt();
    //各マスの飴の個数
    int[][] a = new int[2][n];
    for (int i = 0 ; i < 2 ; i++ ) {
      for (int j = 0; j < n ; j++ ) {
        a[i][j] = stdIn.nextInt();
      }
    }

    //右下に向かって飴を取りながら進む、全パターン
    int sum = 0;
    int cmp = 0;

    for (int k = n ; k > 0 ; k-- ) {
      sum = 0;
      //1段目
      for (int j = 0; j < k ; j++ ) {
        sum += a[0][j];
      }
      //2段目
      for (int j = k - 1 ; j < n ; j++ ) {
        sum += a[1][j];
      }
      //今までの合計の最大値と比較
      if (sum >= cmp) {
        cmp = sum;
      } else {
        sum = cmp;
      }
    }

    System.out.println(sum);
  }
}
