import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int A[] = new int[N];
    int B[] = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      B[i] = sc.nextInt();
    }
    int ans = 0;
    for (int i = 0; i < N; i++) {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int A[] = new int[N];
    int B[] = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      B[i] = sc.nextInt();
    }
    int ans = 0;
    for (int i = 0; i < N; i++) {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int A[] = new int[N];
    int B[] = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      B[i] = sc.nextInt();
    }
    int ans = 0;
    for (int i = 0; i < N; i++) {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int A[] = new int[N];
    int B[] = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      B[i] = sc.nextInt();
    }
    int ans = 0;
    for (int i = 0; i < N; i++) {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    }
    System.out.println(ans);
  } 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[N]; A new int[N] N int B[] = new int[N]; B new int[N] N for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      A[i] = sc.nextInt();
    } {
      A[i] = sc.nextInt();
    } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
      B[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      B[i] = sc.nextInt();
    } {
      B[i] = sc.nextInt();
    } B[i] = sc.nextInt() B[i] B i sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 0; i < N; i++) {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    } {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    } int cost = A[0]; cost A[0] A 0 if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      } i != 0 i 0 {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      } for (int k = 1; k <= i; k++)
          cost += A[k]; int k = 1; int k = 1; k 1 k <= i k i k++ k++ k cost += A[k]; cost += A[k] cost A[k] A k for (int j = i; j < N; j++) {
        cost += B[j];
      } int j = i; int j = i; j i j < N j N j++ j++ j {
        cost += B[j];
      } {
        cost += B[j];
      } cost += B[j] cost B[j] B j ans = Math.max(cost, ans) ans Math.max(cost, ans) Math.max Math cost ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int A[] = new int[N];
    int B[] = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      B[i] = sc.nextInt();
    }
    int ans = 0;
    for (int i = 0; i < N; i++) {
      int cost = A[0];
      if (i != 0) {
        for (int k = 1; k <= i; k++)
          cost += A[k];
      }
      for (int j = i; j < N; j++) {
        cost += B[j];
      }
      ans = Math.max(cost, ans);
    }
    System.out.println(ans);
  }
}