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
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        G solver = new G();
        solver.solve(1, in, out);
        out.close();
    }

    static class G {
        int n;
        int r;
        long[] a;
        long k;
        long[] b;
        long MAX = 2_000_000_000_000_000_000L;

        boolean check(long l) {
            long rem = k;
            Arrays.fill(b, 0);
            long sum = 0;
            long delta;
            for (int i = 0; i < n; i++) {
                if (i + r < n)
                    sum += b[i + r];
                delta = l - a[i] - sum;
                if (delta > 0) {
                    b[Math.min(i + r, n - 1)] += delta;
                    sum += delta;
                    rem -= delta;
                    if (rem < 0) {
                        return false;
                    }
                }
                if (i - r >= 0)
                    sum -= b[i - r];
            }
            return true;
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            n = in.ni();
            r = in.ni();
            k = in.nl();
            a = in.nal(n);
            b = new long[n];
            long[] pref = new long[n + 1];
            for (int i = 0; i < n; i++) {
                pref[i + 1] = pref[i] + a[i];
            }
            for (int i = 0; i < n; i++) {
                int left = Math.max(0, i - r);
                int right = Math.min(n - 1, i + r);
                a[i] = pref[right + 1] - pref[left];
            }

            long left = 0;
            long right = MAX;
            while (left < right) {
                long mid = (left + right + 1) / 2;
                boolean res = check(mid);
                if (res) {
                    left = mid;
                } else {
                    right = mid - 1;
                }
            }
            out.println(left);

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

        public long nl() {
            return Long.parseLong(ns());
        }

        public long[] nal(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) a[i] = nl();
            return a;
        }

    }
}

