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
/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFG {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 1000 * 1000 * 1000 + 7;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "YES";
    private static final String no = "NO";

    void update(int p, long val){ //add val to tree node at p and all its parent, p is 0-based
        p++;
        for(int i = p; i <= n; i += i & -i)
            fen[i] += val;
    }
    long sum(int p){ //get sum between [0, p], p is 0-based
        long res = 0;
        p++;
        for(int i = p; i > 0; i -= i & -i)
            res += fen[i];
        return res;
    }

    int n;
    int r;
    long k;
    long[] arr;
    long[] fen;
    int limit = 500000 + 10;
    void solve() throws IOException {
        n = nextInt();
        r = nextInt();
        k = nextLong();
        arr = nextLongArr(n);
        long l = 0;
        long h = Long.MAX_VALUE / 2;
        fen = new long[limit];
        while (l < h) {
            long mid = (h - l) / 2 + l;
            if (check(mid)) {
                l = mid + 1;
            }
            else {
                h = mid;
            }
        }

        outln(Math.max(0, l - 1));
    }

    boolean check(long mid) {
        Arrays.fill(fen, 0);
        for (int i = 0; i < n; i++) {
            int low = Math.max(0, i - r);
            int high = Math.min(n - 1, i + r);
            fen[low] += arr[i];
            fen[high + 1] -= arr[i];
        }

        long sum = 0;
        long cur = 0;
        for (int i = 0; i < n; i++) {
            cur += fen[i];
            if (cur < mid) {
                long need = mid - cur;
                sum += need;
                if (sum > k) {
                    return false;
                }

                int idx = Math.min(n - 1, i + r);
                int low = Math.max(0, idx - r);
                low = Math.max(low, i + 1);
                int high = Math.min(n - 1, idx + r);
                fen[low] += need;
                fen[high + 1] -= need;
            }
        }

        return true;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }

    int gcd(int a, int b) {
        while(a != 0 && b != 0) {
            int c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }

    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    public CFG() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFG();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}

