import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    }
} 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[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a1 = new int[n]; a1 new int[n] n int[] a2 = new int[n]; a2 new int[n] n for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a1[i] = sc.nextInt();
        } {
            a1[i] = sc.nextInt();
        } a1[i] = sc.nextInt() a1[i] a1 i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a2[i] = sc.nextInt();
        } {
            a2[i] = sc.nextInt();
        } a2[i] = sc.nextInt() a2[i] a2 i sc.nextInt() sc.nextInt sc int sum = 0; sum 0 for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        } int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        } {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        } int n1 = 0; n1 0 int n2 = 0; n2 0 for (int j = 0; j < i; j++) {
                n1 += a1[j];
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
                n1 += a1[j];
            } {
                n1 += a1[j];
            } n1 += a1[j] n1 a1[j] a1 j for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            } int k = i -1; int k = i -1; k i -1 i 1 k < n k n k++ k++ k {
                n2 += a2[k];
            } {
                n2 += a2[k];
            } n2 += a2[k] n2 a2[k] a2 k sum = Math.max(sum, n1 + n2) sum Math.max(sum, n1 + n2) Math.max Math sum n1 + n2 n1 n2 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 1; i < n + 1; i++) {
            int n1 = 0;
            int n2 = 0;
            for (int j = 0; j < i; j++) {
                n1 += a1[j];
            }
            for (int k = i -1; k < n; k++) {
                n2 += a2[k];
            }
            sum = Math.max(sum, n1 + n2);
        }
        System.out.println(sum);
    }
}
