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 < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    System.out.println(max);
  }
} 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 < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    System.out.println(max);
  }
} 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 < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[][] A = new int[2][N];
    for (int i = 0; i < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    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[][] A = new int[2][N]; A new int[2][N] 2 N for (int i = 0; i < N; i++) {
      A[0][i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      A[0][i] = sc.nextInt();
    } {
      A[0][i] = sc.nextInt();
    } A[0][i] = sc.nextInt() A[0][i] A[0] A 0 i sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      A[1][i] = sc.nextInt();
    } {
      A[1][i] = sc.nextInt();
    } A[1][i] = sc.nextInt() A[1][i] A[1] A 1 i sc.nextInt() sc.nextInt sc int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    } {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    } int tmp = 0; tmp 0 for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
        tmp += A[0][j];
      } {
        tmp += A[0][j];
      } tmp += A[0][j] tmp A[0][j] A[0] A 0 j tmp += A[1][i] tmp A[1][i] A[1] A 1 i for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      } int j = i + 1; int j = i + 1; j i + 1 i 1 j < N j N j++ j++ j {
        tmp += A[1][j];
      } {
        tmp += A[1][j];
      } tmp += A[1][j] tmp A[1][j] A[1] A 1 j if (tmp > max) {
        max = tmp;
      } tmp > max tmp max {
        max = tmp;
      } max = tmp max tmp 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[][] A = new int[2][N];
    for (int i = 0; i < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    System.out.println(max);
  }
} 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 < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    System.out.println(max);
  }
} 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 < N; i++) {
      A[0][i] = sc.nextInt();
    }
    for (int i = 0; i < N; i++) {
      A[1][i] = sc.nextInt();
    }
    int max = Integer.MIN_VALUE;
    for (int i = 0; i < N; i++) {
      int tmp = 0;
      for (int j = 0; j <= i; j++) {
        tmp += A[0][j];
      }
      tmp += A[1][i];
      for (int j = i + 1; j < N; j++) {
        tmp += A[1][j];
      }
      if (tmp > max) {
        max = tmp;
      }
    }
    System.out.println(max);
  }
}