import std.stdio,
       std.string,
       std.conv,
       std.algorithm;

void main() {
  int N = readln.chomp.to!(int);
  int[][] arr;
  for (int i = 0; i < 2; i++) { 
    arr ~= readln.chomp.split.to!(int[]);
  }

  int ans = arr[0][0], row;
  for (int i = 1; i < N; i++) {
    if (arr[0][i..N].sum < arr[1][(i - 1)..N].sum) {
      ans += arr[1][(i - 1)..N].sum;
      break;
    }
    ans += arr[0][i];
  }

  if (N == 1) {
    ans += arr[1][0];
  }

  writeln(ans);
}
