import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();

      int[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      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[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      System.out.println(max);
  }
} Main public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();

      int[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      System.out.println(max);
  } main { 
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();

      int[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      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[] up = new int[n]; up new int[n] n up[0] = sc.nextInt() up[0] up 0 sc.nextInt() sc.nextInt sc for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt(); int i = 1; int i = 1; i 1 i < n i n i++ i++ i up[i] = up[i-1] + sc.nextInt(); up[i] = up[i-1] + sc.nextInt() up[i] up i up[i-1] + sc.nextInt() up[i-1] up i-1 i 1 sc.nextInt() sc.nextInt sc int[] down = new int[n]; down new int[n] n for(int i = 0; i < n; i++)
        down[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i down[i] = sc.nextInt(); down[i] = sc.nextInt() down[i] down i sc.nextInt() sc.nextInt sc for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1]; int i = n - 2; int i = n - 2; i n - 2 n 2 i >= 0 i 0 i-- i-- i down[i] += down[i+1]; down[i] += down[i+1] down[i] down i down[i+1] down i+1 i 1 int max = 0; max 0 for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]); int i = 0; int i = 0; i 0 i < n i n i++ i++ i max = Math.max(max, up[i] + down[i]); max = Math.max(max, up[i] + down[i]) max Math.max(max, up[i] + down[i]) Math.max Math max up[i] + down[i] up[i] up i down[i] down i 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[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      System.out.println(max);
  }
} public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();

      int[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      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[] up = new int[n];
      up[0] = sc.nextInt();
      for(int i = 1; i < n; i++)
        up[i] = up[i-1] + sc.nextInt();

      int[] down = new int[n];
      for(int i = 0; i < n; i++)
        down[i] = sc.nextInt();
      for(int i = n - 2; i >= 0; i--)
        down[i] += down[i+1];

      int max = 0;
      for(int i = 0; i < n; i++)
        max = Math.max(max, up[i] + down[i]);
      System.out.println(max);
  }
}