import java.util.Scanner;

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

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  } main {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner 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] = scanner.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] = scanner.nextInt();
      }
    } {
      for (int j = 0; j < N; j++) {
        a[i][j] = scanner.nextInt();
      }
    } for (int j = 0; j < N; j++) {
        a[i][j] = scanner.nextInt();
      } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
        a[i][j] = scanner.nextInt();
      } {
        a[i][j] = scanner.nextInt();
      } a[i][j] = scanner.nextInt() a[i][j] a[i] a i j scanner.nextInt() scanner.nextInt scanner int sum = 0; sum 0 for (int i = 0; i < N; i++) {
      sum += a[0][i];
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      sum += a[0][i];
    } {
      sum += a[0][i];
    } sum += a[0][i] sum a[0][i] a[0] a 0 i sum += a[1][N - 1] sum a[1][N - 1] a[1] a 1 N - 1 N 1 int max = sum; max sum for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    } int i = N - 2; int i = N - 2; i N - 2 N 2 i >= 0 i 0 i-- i-- i {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    } {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    } sum += a[1][i] - a[0][i + 1] sum a[1][i] - a[0][i + 1] a[1][i] a[1] a 1 i a[0][i + 1] a[0] a 0 i + 1 i 1 if (sum > max) max = sum; sum > max sum max max = sum max sum 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 scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  }
} Main
import java.util.Scanner;

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

    int N = scanner.nextInt();
    int[][] a = new int[2][N];

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

    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += a[0][i];
    }
    sum += a[1][N - 1];

    int max = sum;
    for (int i = N - 2; i >= 0; i--) {
      sum += a[1][i] - a[0][i + 1];
      if (sum > max) max = sum;
    }
    System.out.println(max);
  }
}
