import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int getTotal(int arr[], int tmp) {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int getTotal(int arr[], int tmp) {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }

} Main public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    } main {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    } try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String str1[] = br.readLine().split(" "); str1 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int arr1[] = new int[n]; arr1 new int[n] n for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                arr1[i] = Integer.parseInt(str1[i]);
            } {
                arr1[i] = Integer.parseInt(str1[i]);
            } arr1[i] = Integer.parseInt(str1[i]) arr1[i] arr1 i Integer.parseInt(str1[i]) Integer.parseInt Integer str1[i] str1 i String str2[] = br.readLine().split(" "); str2 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int arr2[] = new int[n]; arr2 new int[n] n for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                arr2[i] = Integer.parseInt(str2[i]);
            } {
                arr2[i] = Integer.parseInt(str2[i]);
            } arr2[i] = Integer.parseInt(str2[i]) arr2[i] arr2 i Integer.parseInt(str2[i]) Integer.parseInt Integer str2[i] str2 i int arr[] = new int[n]; arr new int[n] n int index = 0; index 0 int temp = 0; temp 0 for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            } {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            } temp += arr1[i] temp arr1[i] arr1 i arr[index++] = temp + getTotal(arr2, i) arr[index++] arr index++ index temp + getTotal(arr2, i) temp getTotal(arr2, i) getTotal arr2 i int max = arr[0]; max arr[0] arr 0 for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
                if (max < arr[i]) {
                    max = arr[i];
                }
            } {
                if (max < arr[i]) {
                    max = arr[i];
                }
            } if (max < arr[i]) {
                    max = arr[i];
                } max < arr[i] max arr[i] arr i {
                    max = arr[i];
                } max = arr[i] max arr[i] arr i System.out.println(max) System.out.println System.out System System.out max String[] args args public static int getTotal(int arr[], int tmp) {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    } getTotal {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    } int sum = 0; sum 0 for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        } int i = tmp; int i = tmp; i tmp i < arr.length i arr.length arr arr.length i++ i++ i {
            sum += arr[i];
        } {
            sum += arr[i];
        } sum += arr[i] sum arr[i] arr i return sum; sum int arr[] arr int tmp tmp public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int getTotal(int arr[], int tmp) {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }

} public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int getTotal(int arr[], int tmp) {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            int n = Integer.parseInt(br.readLine());
            String str1[] = br.readLine().split(" ");
            int arr1[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr1[i] = Integer.parseInt(str1[i]);
            }
            String str2[] = br.readLine().split(" ");
            int arr2[] = new int[n];
            for (int i = 0; i < n; i++) {
                arr2[i] = Integer.parseInt(str2[i]);
            }
            int arr[] = new int[n];
            int index = 0;
            int temp = 0;
            for (int i = 0; i < n; i++) {
                temp += arr1[i];
                arr[index++] = temp + getTotal(arr2, i);
            }
            int max = arr[0];
            for (int i = 1; i < n; i++) {
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            System.out.println(max);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static int getTotal(int arr[], int tmp) {
        int sum = 0;
        for (int i = tmp; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }

}
