The Fair Nut likes kvass very much. On his birthday parents presented him n kegs of kvass. There are v_i liters of kvass in the i-th keg. Each keg has a lever. You can pour your glass by exactly 1 liter pulling this lever. The Fair Nut likes this drink very much, so he wants to pour his glass by s liters of kvass. But he wants to do it, so kvass level in the least keg is as much as possible.

Help him find out how much kvass can be in the least keg or define it's not possible to pour his glass by s liters of kvass.

Input

The first line contains two integers n and s (1 ≤ n ≤ 10^3, 1 ≤ s ≤ 10^{12}) — the number of kegs and glass volume.

The second line contains n integers v_1, v_2, …, v_n (1 ≤ v_i ≤ 10^9) — the volume of i-th keg.

Output

If the Fair Nut cannot pour his glass by s liters of kvass, print -1. Otherwise, print a single integer — how much kvass in the least keg can be.

Examples

Input

3 3
4 3 5


Output

3


Input

3 4
5 3 4


Output

2


Input

3 7
1 2 3


Output

-1

Note

In the first example, the answer is 3, the Fair Nut can take 1 liter from the first keg and 2 liters from the third keg. There are 3 liters of kvass in each keg.

In the second example, the answer is 2, the Fair Nut can take 3 liters from the first keg and 1 liter from the second keg.

In the third example, the Fair Nut can't pour his cup by 7 liters, so the answer is -1.
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Random;
import java.util.StringTokenizer;

/**
 * @author Sri Mouli
 * Copyright © 2018 Sri Mouli. All rights reserved.
 */

@SuppressWarnings("ALL")
public class B1084 {

    public static long MOD = 1000000007;
    public static long[][][] dp;
    public static String INPUT = "3 " +
            "0 2 1";

    @SuppressWarnings("unused")
    public static void main(String[] args) {
        long time = System.currentTimeMillis();
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        // PrintWriter out = new PrintWriter(new FileOutputStream(new
        // File("output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        FastReader in = new FastReader(oj);
        int n = in.nextInt();
        long s = in.nextLong();
        int[] a = in.nextIntArray(n);
        long sum = in.sum;
        int min = in.min;
        if(s>sum){
            System.out.println("-1");
            return;
        }
        else if(s == sum){
            System.out.println("0");
            return;
        }
        long minChange =  min * Long.valueOf(n);
        long minGlassToChange = sum - minChange;
        if(s<=minGlassToChange){
            System.out.println(min);
            return;
        }
        else {
            long remaining = s-minGlassToChange;
            min -=  Math.toIntExact(remaining/n);
            if(remaining%n==0){
                System.out.println(min);
            }else{
//                if(min==1){
//                    System.out.println(min);
//                    return;
//                } else {
//                    System.out.println(min-1);
//                }
                System.out.println(min-1);
            }
        }
        return;
    }

    public static int upper_bound(int A[], int key) {
        int first = 0;
        int last = A.length;
        int mid;

        while (first < last) {
            mid = first + (last - first) / 2;

            if (A[mid] <= key)
                first = mid + 1;
            else
                last = mid;
        }
        return first;
    }

    // For finding greater than equal to
    public static int lower_bound(int A[], int key) {
        int first = 0;
        int last = A.length;
        int mid;
        while (first < last) {
            mid = first + ((last - first) >> 1);
            if (A[mid] < key)
                first = mid + 1;
            else
                last = mid;
        }

        return first;
    }

    @SuppressWarnings("rawtypes")
    public static void printPermutations(Comparable[] c) {
        System.out.println(Arrays.toString(c));
        while ((c = nextPermutation(c)) != null) {
            System.out.println(Arrays.toString(c));
        }
    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    // modifies c to next permutation or returns null if such permutation does not
    // exist
    public static Comparable[] nextPermutation(final Comparable[] c) {
        // 1. finds the largest k, that c[k] < c[k+1]
        int first = getFirst(c);
        if (first == -1)
            return null; // no greater permutation
        // 2. find last index toSwap, that c[k] < c[toSwap]
        int toSwap = c.length - 1;
        while (c[first].compareTo(c[toSwap]) >= 0)
            --toSwap;
        // 3. swap elements with indexes first and last
        swap(c, first++, toSwap);
        // 4. reverse sequence from k+1 to n (inclusive)
        toSwap = c.length - 1;
        while (first < toSwap)
            swap(c, first++, toSwap--);
        return c;
    }

    // finds the largest k, that c[k] < c[k+1]
    // if no such k exists (there is not greater permutation), return -1
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static int getFirst(final Comparable[] c) {
        for (int i = c.length - 2; i >= 0; --i)
            if (c[i].compareTo(c[i + 1]) < 0)
                return i;
        return -1;
    }

    // swaps two elements (with indexes i and j) in array
    @SuppressWarnings("rawtypes")
    public static void swap(final Comparable[] c, final int i, final int j) {
        final Comparable tmp = c[i];
        c[i] = c[j];
        c[j] = tmp;
    }

    public static long cal(int index, int last, int n, int left) {
        if (index == n) {
            return left == 0 ? 1 : 0;
        }
        if (left < 0) {
            return 0;
        }
        if (dp[last][index][left] != -1) {
            return dp[last][index][left];
        }
        long result = 0;
        for (int i = 0; i < 4; i++) {
            result += cal(index + 1, i, n, left - count(last, i));
            result %= MOD;

        }
        return dp[last][index][left] = result;
    }

    public static int count(int last, int cur) {
        if (last == cur) {
            return 0;
        }
        if (last == 0) {
            return 1;
        }
        if (last == 1) {
            if (cur == 2) {
                return 2;
            }
            return 0;
        }
        if (last == 2) {
            if (cur == 1) {
                return 2;
            }
            return 0;
        }
        return 1;
    }

    public static boolean div(int need, String v) {
        int cur = 0;
        for (int i = 0; i < v.length(); i++) {
            cur += v.charAt(i) - '0';
            if (cur == need) {
                cur = 0;
            } else if (cur > need) {
                return false;
            }
        }
        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            return this.y == other.y;
        }

        @Override
        public int compareTo(Point o) {
            return Integer.compare(x, o.x);
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    private static class Pair {
        long x;
        long y;

        @SuppressWarnings("unused")
        public Pair(long first, long second) {
            this.x = first;
            this.y = second;
        }

        @Override
        public String toString() {
            return "(" + x + "," + y + ")";
        }
    }

    @SuppressWarnings("rawtypes")
    public static Comparator csort = (Comparator<Pair>) (a, b) -> {
        if (a.x < b.x)
            return -1;
        else if (a.x > b.x)
            return 1;
        else
            return Long.compare(a.y, b.y);
    };

    static class FastReader {

        BufferedReader br;
        StringTokenizer st;
        InputStream is;
        byte[] inbuf = new byte[1024];
        int lenbuf = 0, ptrbuf = 0;

        FastReader(boolean onlineJudge) {
            is = onlineJudge ? System.in : new ByteArrayInputStream(INPUT.getBytes());
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        FastReader(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        char nextChar() {
            return next().charAt(0);
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        long sum = 0;
        int min = Integer.MAX_VALUE;
        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                int cur = nextInt();
                a[i] = cur;
                if(min>cur){
                    min = cur;
                }
                sum+=cur;
            }
            return a;
        }

        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        int[][] next2DInt(int n, int m) {
            int[][] arr = new int[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextIntArray(m);
            }
            return arr;
        }

        long[][] next2DLong(int n, int m) {
            long[][] arr = new long[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLongArray(m);
            }
            return arr;
        }

        int[] shuffle(int[] arr) {
            Random r = new Random();
            for (int i = 1, j; i < arr.length; i++) {
                j = r.nextInt(i);
                arr[i] = arr[i] ^ arr[j];
                arr[j] = arr[i] ^ arr[j];
                arr[i] = arr[i] ^ arr[j];
            }
            return arr;
        }

        int[] uniq(int[] arr) {
            Arrays.sort(arr);
            int[] rv = new int[arr.length];
            int pos = 0;
            rv[pos++] = arr[0];
            for (int i = 1; i < arr.length; i++) {
                if (arr[i] != arr[i - 1]) {
                    rv[pos++] = arr[i];
                }
            }
            return Arrays.copyOf(rv, pos);
        }

    }

}
