import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  }
} Main public static void main(String[] args) {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  } main {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  } int n = 0; n 0 String[] lineOne = null; lineOne null String[] lineTwo = null; lineTwo null try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    } IOException e {
      e.printStackTrace();
      System.exit(1);
    } e.printStackTrace() e.printStackTrace e System.exit(1) System.exit System 1 {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) n = Integer.parseInt(br.readLine()) n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br lineOne = br.readLine().split("\\s") lineOne br.readLine().split("\\s") br.readLine().split br.readLine() br.readLine br "\\s" lineTwo = br.readLine().split("\\s") lineTwo br.readLine().split("\\s") br.readLine().split br.readLine() br.readLine br "\\s" int max = 0; max 0 for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    } {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    } int sum = 0; sum 0 for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
        sum += Integer.parseInt(lineOne[j]);
      } {
        sum += Integer.parseInt(lineOne[j]);
      } sum += Integer.parseInt(lineOne[j]) sum Integer.parseInt(lineOne[j]) Integer.parseInt Integer lineOne[j] lineOne j sum += Integer.parseInt(lineTwo[i]) sum Integer.parseInt(lineTwo[i]) Integer.parseInt Integer lineTwo[i] lineTwo i for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      } int l = i + 1; int l = i + 1; l i + 1 i 1 l <= n - 1 l n - 1 n 1 l++ l++ l {
        sum += Integer.parseInt(lineTwo[l]);
      } {
        sum += Integer.parseInt(lineTwo[l]);
      } sum += Integer.parseInt(lineTwo[l]) sum Integer.parseInt(lineTwo[l]) Integer.parseInt Integer lineTwo[l] lineTwo l max = Math.max(max, sum) max Math.max(max, sum) Math.max Math max sum System.out.print(max) System.out.print System.out System System.out max String[] args args public class Main {

  public static void main(String[] args) {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  }
} public class Main {

  public static void main(String[] args) {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) {

    int n = 0;
    String[] lineOne = null;
    String[] lineTwo = null;
    try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
      n = Integer.parseInt(br.readLine());
      lineOne = br.readLine().split("\\s");
      lineTwo = br.readLine().split("\\s");
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

    int max = 0;
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j <= i; j++) {
        sum += Integer.parseInt(lineOne[j]);
      }
      sum += Integer.parseInt(lineTwo[i]);
      for (int l = i + 1; l <= n - 1; l++) {
        sum += Integer.parseInt(lineTwo[l]);
      }
      max = Math.max(max, sum);
    }
    System.out.print(max);
  }
}
