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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.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] = sc.nextInt();
      }
    } {
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    } for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
        a[i][j] = sc.nextInt();
      } {
        a[i][j] = sc.nextInt();
      } a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc int max = 0; max 0 int x = 0; x 0 int count = n; count n while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    } count > 0 count 0 {
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    } int sum = 0; sum 0 int i = 0; i 0 for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      } {
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      } sum += a[i][j] sum a[i][j] a[i] a i j if(j == x){
          i++;
          sum += a[i][j];
        } j == x j x {
          i++;
          sum += a[i][j];
        } i++ i sum += a[i][j] sum a[i][j] a[i] a i j if(max < sum){
        max = sum;
      } max < sum max sum {
        max = sum;
      } max = sum max sum x++ x count-- count 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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    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 < 2;i++){
      for(int j = 0;j < n;j++){
        a[i][j] = sc.nextInt();
      }
    }
    int max = 0;
    int x = 0;
    int count = n;
    while(count > 0){
      int sum = 0;
      int i = 0;
      for(int j = 0;j < n;j++){
        sum += a[i][j];
        if(j == x){
          i++;
          sum += a[i][j];
        }
      }
      if(max < sum){
        max = sum;
      }
      x++;
      count--;
    }
    System.out.println(max);
  }
}