You are given a rectangular table 3 × n. Each cell contains an integer. You can move from one cell to another if they share a side.

Find such path from the upper left cell to the bottom right cell of the table that doesn't visit any of the cells twice, and the sum of numbers written in the cells of this path is maximum possible.

Input

The first line contains an integer n (1 ≤ n ≤ 105) — the number of columns in the table.

Next three lines contain n integers each — the description of the table. The j-th number in the i-th line corresponds to the cell aij ( - 109 ≤ aij ≤ 109) of the table.

Output

Output the maximum sum of numbers on a path from the upper left cell to the bottom right cell of the table, that doesn't visit any of the cells twice.

Examples

Input

3
1 1 1
1 -1 1
1 1 1


Output

7


Input

5
10 10 10 -1 -1
-1 10 10 10 10
-1 10 10 10 10


Output

110

Note

The path for the first example:

<image>

The path for the second example:

<image>
#include <bits/stdc++.h>
using namespace std;
int Q, N, M, K, L;
long long A[3][100001];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
long long dp[3][100001];
bool visit[3][100001];
struct Go {
  long long x, y, v;
};
void adv(int x, int y, int ox, long long v, int adved, vector<Go>& r) {
  visit[y][x] = 1;
  if (x == ox + 1 && !adved) {
    r.push_back({x, y, v});
  }
  if (x == ox + 2 && !visit[y][x + 1]) {
    r.push_back({x, y, v});
  }
  if (x == ox + 3) {
    visit[y][x] = 0;
    return;
  }
  for (int i = 0; i < 4; i++) {
    int nx = x + dx[i];
    int ny = y + dy[i];
    if (nx <= ox || ny < 0 || nx >= N || ny >= 3) continue;
    if (visit[ny][nx]) continue;
    adv(nx, ny, ox, v + A[ny][nx], (adved | (nx == ox + 2)), r);
  }
  visit[y][x] = 0;
}
long long solve(int x, int y) {
  if (x == N - 1) {
    if (y == 2)
      return 0;
    else
      return -1e16;
  }
  long long& r = dp[y][x];
  if (~r) return r;
  r = -1e16;
  vector<Go> nexts;
  adv(x, y, x, 0, 0, nexts);
  for (int i = 0; i < nexts.size(); i++) {
    Go next = nexts[i];
    r = max(solve(next.x, next.y) + next.v, r);
  }
  return r;
}
int main() {
  ios::sync_with_stdio(false);
  memset(dp, -1, sizeof dp);
  cin >> N;
  for (int i = 0; i < 3; i++) {
    for (int j = 1; j <= N; j++) {
      cin >> A[i][j];
    }
  }
  N++;
  cout << solve(0, 0);
  cin >> N;
}
