output_description: Print the maximum number of candies that can be collected.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_{1, 1} A_{1, 2} ... A_{1, N}
      A_{2, 1} A_{2, 2} ... A_{2, N}
attempt: #include<iostream>
  #include<string>
  #include<algorithm>
  #include<vector>
  #include<iomanip>
  #include<math.h>
  #include<complex>
  #include<queue>
  #include<deque>
  #include<stack>
  #include<map>
  #include<set>
  #include<bitset>
  #include<functional>
  #include<assert.h>
  #include<numeric>
  #include<stdio.h>
  #include <cstdint>
  #include <stdlib.h>
  #include <time.h>
  using namespace std;
  #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
  #define rep(i,n) REP(i,0,n)
  #define rrep(i,n) REP(i,1,n+1)
  #define all(a) a.begin(), a.end()
  #define fi first
  #define se second
  #define RNG(x, a, n) &((x)[a]), &((x)[n])
  long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
  long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
  typedef long long ll;
  typedef pair<ll, ll> Pll;
  typedef pair<int, int> PII;
  typedef vector<ll> Vl;
  typedef vector<int> VI;
  typedef tuple<int, int, int> TT;
  #define chmin(x,y) x = min(x,y)
  #define chmax(x,y) x = max(x,y)
  #define rall(v) v.rbegin(), v.rend()
  #define dmp(x,y) make_pair(x,y)
  #define dmt(x, y, z) make_tuple(x, y, z)
  #define pb(x) push_back(x)
  #define pf(x) push_front(x)
  const int MAX = 2000000;
  const int inf = 1000000007;
  const ll mod = 1000000007;
  const ll longinf = 1LL << 60;
  const long double PI = (acos(-1));
  const long double EPS = 0.0000000001;
   
  int dx[4] = { 1, 0, -1, 0 };
  int dy[4] = { 0, 1, 0, -1 };
   
   
   
  int n, ans;
  int a[2][100005];
   
  int main() {
   
  cin >> n;
   
  rep(i, 2) {
  rrep(j, n) {
  int tmp;
  cin >> tmp;
  a[i][j] = a[i][j - 1] + tmp;
  }
  }
   
  rrep(i, n) {
  ans = max(ans, a[0][i] + (a[1][n] - a[1][i - 1]));
  }
   
  cout << ans << endl;
   int heath=4;
  return 0;
  }
problem_description: Statement
  
  We have a 2 \times N grid. We will denote the square at the i-th row and j-th
  column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j).
  
  You are initially in the top-left square, (1, 1). You will travel to the
  bottom-right square, (2, N), by repeatedly moving right or down.
  
  The square (i, j) contains A_{i, j} candies. You will collect all the candies
  you visit during the travel. The top-left and bottom-right squares also
  contain candies, and you will also collect them.
  
  At most how many candies can you collect when you choose the best way to
  travel?
samples: [{"input": "5\n    3 2 2 4 1\n    1 2 2 2 1", "output": "14\n    \n\nThe number of collected candies will be maximized when you:\n\n  * move right three times, then move down once, then move right once.\n\n* * *"}, {"input": "4\n    1 1 1 1\n    1 1 1 1", "output": "5\n    \n\nYou will always collect the same number of candies, regardless of how you\ntravel.\n\n* * *"}, {"input": "7\n    3 3 4 5 4 5 3\n    5 3 4 4 2 3 2", "output": "29\n    \n\n* * *"}, {"input": "1\n    2\n    3", "output": "5"}]