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+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  }
} 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+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[][] A = new int[2+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[][] A = new int[2+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  } 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+1][N+1]; A new int[2+1][N+1] 2+1 2 1 N+1 N 1 for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    } int i = 1; int i = 1; i 1 i <= 2 i 2 i++ i++ i {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    } {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    } for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      } int j = 1; int j = 1; j 1 j <= N j N j++ j++ j {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      } {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]) A[i][j] A[i] A i j a + Math.max(A[i-1][j], A[i][j-1]) a Math.max(A[i-1][j], A[i][j-1]) Math.max Math A[i-1][j] A[i-1] A i-1 i 1 j A[i][j-1] A[i] A i j-1 j 1 System.out.println(A[2][N]) System.out.println System.out System System.out A[2][N] A[2] A 2 N 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+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[][] A = new int[2+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  }
} 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+1][N+1];
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= N; j++) {
        int a = sc.nextInt();
        A[i][j] = a + Math.max(A[i-1][j], A[i][j-1]);
      }
    }
    
    System.out.println(A[2][N]);
  }
}