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

public class Main
{
  private static int in_N;
  private static int in_Y;



  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }



}



class Data
{
  public int     m_now_N_1k;
  public int     m_now_N_5k;
  public int     m_now_N_10k;
  public int     m_now_Y;
  public boolean m_result;


  public Data()
  {
    m_now_N_1k  = 0;
    m_now_N_5k  = 0;
    m_now_N_10k = 0;
    m_now_Y     = 0;
    m_result    = false;
  }

  public Data
  (
    Data i_ref
  )
  {
    this.m_now_N_1k  = i_ref.m_now_N_1k;
    this.m_now_N_5k  = i_ref.m_now_N_5k;
    this.m_now_N_10k = i_ref.m_now_N_10k;
    this.m_now_Y     = i_ref.m_now_Y;
    this.m_result    = i_ref.m_result;
  }



  public int getN()
  {
    return m_now_N_1k + m_now_N_5k + m_now_N_10k;
  }
}



class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main
{
  private static int in_N;
  private static int in_Y;



  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }



} Main private static int in_N; in_N private static int in_Y; in_Y public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  } main {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  } BufferedReader in_stream; in_stream String         in_str; in_str String[]       in_str_split; in_str_split int   in_N; in_N int[] in_A1; in_A1 int[] in_A2; in_A2 int cnt; cnt int cnt_sum; cnt_sum int tmp_sum; tmp_sum int ans; ans try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    } catch(Exception e)
    {
      e.printStackTrace();
    } Exception e {
      e.printStackTrace();
    } e.printStackTrace() e.printStackTrace e {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    } in_stream    = new BufferedReader(new InputStreamReader(System.in)) in_stream new BufferedReader(new InputStreamReader(System.in)) in_str = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_N   = Integer.parseInt(in_str) in_N Integer.parseInt(in_str) Integer.parseInt Integer in_str in_A1 = new int[in_N] in_A1 new int[in_N] in_N in_A2 = new int[in_N] in_A2 new int[in_N] in_N in_str       = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_str_split = in_str.split(" ") in_str_split in_str.split(" ") in_str.split in_str " " for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      } cnt=0; cnt=0 cnt 0 cnt<in_N cnt in_N cnt++ cnt++ cnt {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      } {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      } in_A1[cnt] = Integer.parseInt(in_str_split[cnt]) in_A1[cnt] in_A1 cnt Integer.parseInt(in_str_split[cnt]) Integer.parseInt Integer in_str_split[cnt] in_str_split cnt in_str       = new String(in_stream.readLine()) in_str new String(in_stream.readLine()) in_str_split = in_str.split(" ") in_str_split in_str.split(" ") in_str.split in_str " " for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      } cnt=0; cnt=0 cnt 0 cnt<in_N cnt in_N cnt++ cnt++ cnt {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      } {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      } in_A2[cnt] = Integer.parseInt(in_str_split[cnt]) in_A2[cnt] in_A2 cnt Integer.parseInt(in_str_split[cnt]) Integer.parseInt Integer in_str_split[cnt] in_str_split cnt ans = 0 ans 0 for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      } cnt=0; cnt=0 cnt 0 cnt<in_N cnt in_N cnt++ cnt++ cnt {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      } {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      } tmp_sum = 0 tmp_sum 0 for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        } cnt_sum=0; cnt_sum=0 cnt_sum 0 cnt_sum<=cnt cnt_sum cnt cnt_sum++ cnt_sum++ cnt_sum {
          tmp_sum += in_A1[cnt_sum];
        } {
          tmp_sum += in_A1[cnt_sum];
        } tmp_sum += in_A1[cnt_sum] tmp_sum in_A1[cnt_sum] in_A1 cnt_sum for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        } cnt_sum=cnt; cnt_sum=cnt cnt_sum cnt cnt_sum<in_N cnt_sum in_N cnt_sum++ cnt_sum++ cnt_sum {
          tmp_sum += in_A2[cnt_sum];
        } {
          tmp_sum += in_A2[cnt_sum];
        } tmp_sum += in_A2[cnt_sum] tmp_sum in_A2[cnt_sum] in_A2 cnt_sum if(ans < tmp_sum)
        {
          ans = tmp_sum;
        } ans < tmp_sum ans tmp_sum {
          ans = tmp_sum;
        } ans = tmp_sum ans tmp_sum UtilLog.ans_ln("" + ans) UtilLog.ans_ln UtilLog "" + ans "" ans String[] args args class Data
{
  public int     m_now_N_1k;
  public int     m_now_N_5k;
  public int     m_now_N_10k;
  public int     m_now_Y;
  public boolean m_result;


  public Data()
  {
    m_now_N_1k  = 0;
    m_now_N_5k  = 0;
    m_now_N_10k = 0;
    m_now_Y     = 0;
    m_result    = false;
  }

  public Data
  (
    Data i_ref
  )
  {
    this.m_now_N_1k  = i_ref.m_now_N_1k;
    this.m_now_N_5k  = i_ref.m_now_N_5k;
    this.m_now_N_10k = i_ref.m_now_N_10k;
    this.m_now_Y     = i_ref.m_now_Y;
    this.m_result    = i_ref.m_result;
  }



  public int getN()
  {
    return m_now_N_1k + m_now_N_5k + m_now_N_10k;
  }
} Data public int     m_now_N_1k; m_now_N_1k public int     m_now_N_5k; m_now_N_5k public int     m_now_N_10k; m_now_N_10k public int     m_now_Y; m_now_Y public boolean m_result; m_result public Data()
  {
    m_now_N_1k  = 0;
    m_now_N_5k  = 0;
    m_now_N_10k = 0;
    m_now_Y     = 0;
    m_result    = false;
  } Data {
    m_now_N_1k  = 0;
    m_now_N_5k  = 0;
    m_now_N_10k = 0;
    m_now_Y     = 0;
    m_result    = false;
  } m_now_N_1k  = 0 m_now_N_1k 0 m_now_N_5k  = 0 m_now_N_5k 0 m_now_N_10k = 0 m_now_N_10k 0 m_now_Y     = 0 m_now_Y 0 m_result    = false m_result false public Data
  (
    Data i_ref
  )
  {
    this.m_now_N_1k  = i_ref.m_now_N_1k;
    this.m_now_N_5k  = i_ref.m_now_N_5k;
    this.m_now_N_10k = i_ref.m_now_N_10k;
    this.m_now_Y     = i_ref.m_now_Y;
    this.m_result    = i_ref.m_result;
  } Data {
    this.m_now_N_1k  = i_ref.m_now_N_1k;
    this.m_now_N_5k  = i_ref.m_now_N_5k;
    this.m_now_N_10k = i_ref.m_now_N_10k;
    this.m_now_Y     = i_ref.m_now_Y;
    this.m_result    = i_ref.m_result;
  } this.m_now_N_1k  = i_ref.m_now_N_1k this.m_now_N_1k this this.m_now_N_1k i_ref.m_now_N_1k i_ref i_ref.m_now_N_1k this.m_now_N_5k  = i_ref.m_now_N_5k this.m_now_N_5k this this.m_now_N_5k i_ref.m_now_N_5k i_ref i_ref.m_now_N_5k this.m_now_N_10k = i_ref.m_now_N_10k this.m_now_N_10k this this.m_now_N_10k i_ref.m_now_N_10k i_ref i_ref.m_now_N_10k this.m_now_Y     = i_ref.m_now_Y this.m_now_Y this this.m_now_Y i_ref.m_now_Y i_ref i_ref.m_now_Y this.m_result    = i_ref.m_result this.m_result this this.m_result i_ref.m_result i_ref i_ref.m_result Data i_ref i_ref public int getN()
  {
    return m_now_N_1k + m_now_N_5k + m_now_N_10k;
  } getN {
    return m_now_N_1k + m_now_N_5k + m_now_N_10k;
  } return m_now_N_1k + m_now_N_5k + m_now_N_10k; m_now_N_1k + m_now_N_5k + m_now_N_10k m_now_N_1k + m_now_N_5k + m_now_N_10k m_now_N_1k m_now_N_5k m_now_N_10k class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
} UtilLog private static boolean is_debug_mode = false; is_debug_mode false public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  } ans_ln {
    System.out.println(i_message);
  } System.out.println(i_message) System.out.println System.out System System.out i_message String i_message i_message public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  } ans_f {
    System.out.printf(i_message);
  } System.out.printf(i_message) System.out.printf System.out System System.out i_message String i_message i_message public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  } inf_ln {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  } StackTraceElement[] stack; stack if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    } is_debug_mode {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    } stack = new Throwable().getStackTrace() stack new Throwable().getStackTrace() new Throwable().getStackTrace new Throwable() System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      ) System.out.println System.out System System.out String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          ) String.format String "[inf][%s:%s():%5d]" stack[1].getClassName() stack[1].getClassName stack[1] stack 1 stack[1].getMethodName() stack[1].getMethodName stack[1] stack 1 stack[1].getLineNumber() stack[1].getLineNumber stack[1] stack 1 i_message String i_message i_message public class Main
{
  private static int in_N;
  private static int in_Y;



  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }



} public class Main
{
  private static int in_N;
  private static int in_Y;



  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }



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

public class Main
{
  private static int in_N;
  private static int in_Y;



  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;


    int   in_N;
    int[] in_A1;
    int[] in_A2;

    int cnt;
    int cnt_sum;
    int tmp_sum;
    int ans;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));

      in_str = new String(in_stream.readLine());
      in_N   = Integer.parseInt(in_str);

      in_A1 = new int[in_N];
      in_A2 = new int[in_N];

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A1[cnt] = Integer.parseInt(in_str_split[cnt]);
      }

      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");
      for(cnt=0; cnt<in_N; cnt++)
      {

        in_A2[cnt] = Integer.parseInt(in_str_split[cnt]);
      }


      ans = 0;
      for(cnt=0; cnt<in_N; cnt++)
      {
        tmp_sum = 0;
        for(cnt_sum=0; cnt_sum<=cnt; cnt_sum++)
        {
          tmp_sum += in_A1[cnt_sum];
        }
        for(cnt_sum=cnt; cnt_sum<in_N; cnt_sum++)
        {
          tmp_sum += in_A2[cnt_sum];
        }

        if(ans < tmp_sum)
        {
          ans = tmp_sum;
        }
      }

      UtilLog.ans_ln("" + ans);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }



}



class Data
{
  public int     m_now_N_1k;
  public int     m_now_N_5k;
  public int     m_now_N_10k;
  public int     m_now_Y;
  public boolean m_result;


  public Data()
  {
    m_now_N_1k  = 0;
    m_now_N_5k  = 0;
    m_now_N_10k = 0;
    m_now_Y     = 0;
    m_result    = false;
  }

  public Data
  (
    Data i_ref
  )
  {
    this.m_now_N_1k  = i_ref.m_now_N_1k;
    this.m_now_N_5k  = i_ref.m_now_N_5k;
    this.m_now_N_10k = i_ref.m_now_N_10k;
    this.m_now_Y     = i_ref.m_now_Y;
    this.m_result    = i_ref.m_result;
  }



  public int getN()
  {
    return m_now_N_1k + m_now_N_5k + m_now_N_10k;
  }
}



class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
}
