import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next 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] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a1[i] = Integer.parseInt(sc.next());
        } {
            a1[i] = Integer.parseInt(sc.next());
        } a1[i] = Integer.parseInt(sc.next()) a1[i] a1 i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a2[i] = Integer.parseInt(sc.next());
        } {
            a2[i] = Integer.parseInt(sc.next());
        } a2[i] = Integer.parseInt(sc.next()) a2[i] a2 i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int result = 0; result 0 for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        } {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        } int sum1 = 0; sum1 0 int sum2 = 0; sum2 0 for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                sum1 += a1[j];
            } {
                sum1 += a1[j];
            } sum1 += a1[j] sum1 a1[j] a1 j for (int j = i; j < n; j++) {
                sum2 += a2[j];
            } int j = i; int j = i; j i j < n j n j++ j++ j {
                sum2 += a2[j];
            } {
                sum2 += a2[j];
            } sum2 += a2[j] sum2 a2[j] a2 j int sum = sum1 + sum2; sum sum1 + sum2 sum1 sum2 result = Math.max(result, sum) result Math.max(result, sum) Math.max Math result sum System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < n; i++) {
            a2[i] = Integer.parseInt(sc.next());
        }

        // 主処理
        int result = 0;
        for (int i = 0; i < n; i++) {
            int sum1 = 0;
            int sum2 = 0;
            for (int j = 0; j <= i; j++) {
                sum1 += a1[j];
            }
            for (int j = i; j < n; j++) {
                sum2 += a2[j];
            }
            int sum = sum1 + sum2;
            result = Math.max(result, sum);
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
}
