Today you are going to lead a group of elven archers to defend the castle that is attacked by an army of angry orcs. Three sides of the castle are protected by impassable mountains and the remaining side is occupied by a long wall that is split into n sections. At this moment there are exactly ai archers located at the i-th section of this wall. You know that archer who stands at section i can shoot orcs that attack section located at distance not exceeding r, that is all such sections j that |i - j| ≤ r. In particular, r = 0 means that archers are only capable of shooting at orcs who attack section i.

Denote as defense level of section i the total number of archers who can shoot at the orcs attacking this section. Reliability of the defense plan is the minimum value of defense level of individual wall section.

There is a little time left till the attack so you can't redistribute archers that are already located at the wall. However, there is a reserve of k archers that you can distribute among wall sections in arbitrary way. You would like to achieve maximum possible reliability of the defence plan.

Input

The first line of the input contains three integers n, r and k (1 ≤ n ≤ 500 000, 0 ≤ r ≤ n, 0 ≤ k ≤ 1018) — the number of sections of the wall, the maximum distance to other section archers can still shoot and the number of archers yet to be distributed along the wall. The second line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 109) — the current number of archers at each section.

Output

Print one integer — the maximum possible value of defense plan reliability, i.e. the maximum possible value of minimum defense level if we distribute k additional archers optimally.

Examples

Input

5 0 6
5 4 3 4 9


Output

5


Input

4 2 0
1 2 3 4


Output

6


Input

5 1 1
2 1 2 1 2


Output

3
#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
template <class T>
inline T biton(T n, T pos) {
  return n | ((T)1 << pos);
}
template <class T>
inline T bitoff(T n, T pos) {
  return n & ~((T)1 << pos);
}
template <class T>
inline T ison(T n, T pos) {
  return (bool)(n & ((T)1 << pos));
}
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
inline int nxt() {
  int aaa;
  scanf("%d", &aaa);
  return aaa;
}
inline long long int lxt() {
  long long int aaa;
  scanf("%lld", &aaa);
  return aaa;
}
inline double dxt() {
  double aaa;
  scanf("%lf", &aaa);
  return aaa;
}
template <class T>
inline T bigmod(T p, T e, T m) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % m;
    p = (p * p) % m;
  }
  return (T)ret;
}
long long int ar[600010];
long long int sum[600010];
long long int cum[600010];
long long int tree[600010];
void update(int pos, int limit, long long int val) {
  while (pos <= limit) {
    tree[pos] += val;
    pos += pos & (-pos);
  }
}
long long int query(int pos) {
  long long int s = 0;
  while (pos > 0) {
    s += tree[pos];
    pos -= pos & (-pos);
  }
  return s;
}
bool go(long long int mid, long long int k, int n, int r) {
  int i = 1;
  memset(cum, 0, sizeof(cum));
  while (i <= n) {
    cum[i] += cum[i - 1];
    if (sum[i] + cum[i] < mid) {
      long long int extra = mid - (sum[i] + cum[i]);
      cum[i] += extra;
      cum[min(i + 2 * r + 1, n + 1)] -= extra;
      k -= extra;
      if (k < 0) return false;
    }
    i++;
  }
  return k >= 0;
}
int main() {
  int n = nxt();
  int r = nxt();
  long long int k = lxt();
  for (int i = 1; i <= n; i++) {
    ar[i] = lxt();
  }
  for (int i = 1; i <= n; i++) {
    int le = i - r;
    int ri = i + r;
    le = max(le, 1);
    ri = min(ri, n);
    sum[le] += ar[i];
    sum[ri + 1] -= ar[i];
  }
  for (int i = 1; i <= n; i++) sum[i] += sum[i - 1];
  long long int b = 0;
  long long int e = (long long int)LLONG_MAX;
  while (b <= e) {
    long long int mid = (b + e) / 2;
    if (go(mid, k, n, r))
      b = mid + 1;
    else
      e = mid - 1;
  }
  cout << b - 1 << endl;
  return 0;
}
