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.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
 
 public class realfast implements Runnable {
    private static final int INF = (int) 1e9;
    long in= (long)Math.pow(10,9);
    public  void solve() throws IOException 
    {
       int n = readInt();
       int r = readInt();
       long k = readLong();
       long left =0;
       long right = (long)Math.pow(2,60);

       long arr[]= new long[n];
       for(int i=0;i<n;i++)
         arr[i]= readLong();
        long pre[]= new long[n+1];
        for(int i=1;i<=n;i++)
            pre[i]=pre[i-1]+arr[i-1];
        for(int i=0;i<n;i++)
        {
            int l = i-r;
            int far = i+r+1;
            if(far>=n)
                far=n;
            if(l<0)
                l=0;
            arr[i]= pre[far]-pre[l];
        }

       long ans=0;
       while(left<=right)
       {
         long mid = left+(right-left)/2;

         if(dfs(arr,k,2*r,mid))
         {
            ans=mid;
            left=mid+1;
            
         }
         else
         {
           right=mid-1;
         }
          
       }
       
        out.println(ans);

    }
    public boolean dfs(long arr[],long k , int r, long com)
    {
         int n = arr.length;
          int i=0;
          long count=0;
          long diff[]= new long [n+r+2];
          long change =0;
          
          while(i<arr.length)
          {

            change = change +diff[i];

            long diff1= Math.max(0,com-change-arr[i]);
            count=count+ diff1;
            if(count>k)
            return false; 
             diff[i+r+1]= diff[i+r+1]-diff1;
            change= change+diff1;
            i++;

          }
          if(count<=k)
            return true;
          else
            return false;
    }
    public long build(long seg[],long arr[], int left, int right, int index )
    {
           if(left==right)
           {
            seg[index]= arr[left];
            return seg[index];
           }
           int mid = left + (right-left)/2;
           long val1= build(seg,arr,left,mid,2*index+1);
           long val2 = build(seg,arr,mid+1,right,2*index+2);
           seg[index]=Math.min(val1,val2);
           return seg[index];
    }  
    public long find(long seg[], long arr[],int index, int left, int right, int l ,int r)
    {
         if(right<l||r<left)
            return 1000000001;

        if(left>=l&&right<=r)
            return seg[index];
        int mid = left +(right-left)/2;
        long val1 = find(seg,arr,2*index+1,left,mid,l,r);
        long val2 = find(seg,arr,2*index+2,mid+1,right,l,r);
        return Math.min(val1,val2);
    }
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    public static void main(String[] args) {
        new Thread(null, new realfast(), "", 128 * (1L << 20)).start();
    }
 
    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter out;
 
    @Override
    public void run() {
        try {
            if (ONLINE_JUDGE || !new File("input.txt").exists()) {
                reader = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                reader = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            solve();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                // nothing
            }
            out.close();
        }
    }
 
    private String readString() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
 
    @SuppressWarnings("unused")
    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }
 
    @SuppressWarnings("unused")
    private long readLong() throws IOException {
        return Long.parseLong(readString());
    }
 
    @SuppressWarnings("unused")
    private double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
}
class edge implements Comparable<edge>{
    int u ;
    int v ;
    int val;
    edge(int u1, int v1 , int val1)
    {
       this.u=u1;
       this.v=v1;
       this.val=val1;
    }
    public int compareTo(edge e)
    {
        return this.val-e.val;
    }
}