import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  }

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

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  } main {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc 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] = sc.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] = sc.nextInt();
      }
    } {
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    } for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
        A[i][j] = sc.nextInt();
      } {
        A[i][j] = sc.nextInt();
      } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc sc.close() sc.close sc int count = 0; count 0 int count_ = 0; count_ 0 for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    } {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    } for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
        count_ += A[0][j];
      } {
        count_ += A[0][j];
      } count_ += A[0][j] count_ A[0][j] A[0] A 0 j for (int j = i; j < N; j++) {
        count_ += A[1][j];
      } int j = i; int j = i; j i j < N j N j++ j++ j {
        count_ += A[1][j];
      } {
        count_ += A[1][j];
      } count_ += A[1][j] count_ A[1][j] A[1] A 1 j count = Math.max(count, count_) count Math.max(count, count_) Math.max Math count count_ count_ = 0 count_ 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  }

} Main
import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[][] A = new int[2][N];

    for (int i = 0; i < 2; i++){
      for (int j = 0; j < N; j++) {
        A[i][j] = sc.nextInt();
      }
    }

    sc.close();

    int count = 0;
    int count_ = 0;

    // 右に A 回移動する
    // 下に 1 回移動する
    // 右に N - A 回移動する

    for (int i = 0; i < N; i++) {
      for (int j = 0; j <= i; j++) {
        count_ += A[0][j];
      }
      for (int j = i; j < N; j++) {
        count_ += A[1][j];
      }
      count = Math.max(count, count_);
      count_ = 0;
    }

    System.out.println(count);

  }

}