Bran and his older sister Arya are from the same house. Bran like candies so much, so Arya is going to give him some Candies.

At first, Arya and Bran have 0 Candies. There are n days, at the i-th day, Arya finds ai candies in a box, that is given by the Many-Faced God. Every day she can give Bran at most 8 of her candies. If she don't give him the candies at the same day, they are saved for her and she can give them to him later.

Your task is to find the minimum number of days Arya needs to give Bran k candies before the end of the n-th day. Formally, you need to output the minimum day index to the end of which k candies will be given out (the days are indexed from 1 to n).

Print -1 if she can't give him k candies during n given days.

Input

The first line contains two integers n and k (1 ≤ n ≤ 100, 1 ≤ k ≤ 10000).

The second line contains n integers a1, a2, a3, ..., an (1 ≤ ai ≤ 100).

Output

If it is impossible for Arya to give Bran k candies within n days, print -1.

Otherwise print a single integer — the minimum number of days Arya needs to give Bran k candies before the end of the n-th day.

Examples

Input

2 3
1 2


Output

2

Input

3 17
10 10 10


Output

3

Input

1 9
10


Output

-1

Note

In the first sample, Arya can give Bran 3 candies in 2 days.

In the second sample, Arya can give Bran 17 candies in 3 days, because she can give him at most 8 candies per day.

In the third sample, Arya can't give Bran 9 candies, because she can give him at most 8 candies per day and she must give him the candies within 1 day.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
import java.util.stream.Collectors;

public class Main {
    private static IO io = new IO();

    public static void main(String[] args) throws Exception {
        int n = io.getInt(), k = io.getInt(), cnt = -1, cur = 0;
        List<Integer> as = io.getIntegerArray(n);
        for(int i = 0 ; i < as.size() ; i++){
            cur += as.get(i);
            k -= Math.min(8, cur);
            cur -= Math.min(8, cur);
            if(k <= 0){
                cnt = i ;
                break;
            }
        }
        System.out.println(cnt < 0? -1: cnt + 1);
    }
}

class IO {
    private BufferedReader br = null;
    private StringTokenizer st = null;

    public IO() {
        this(System.in);
    }

    public IO(InputStream is) {
        this.br = new BufferedReader(new InputStreamReader(is));
    }

    public List<String> getStringArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        if (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        List<String> res = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if (!st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            res.add(st.nextToken());
        }
        return res;
    }

    public String getString() throws IOException {
        List<String> res = this.getStringArray(1);
        return res.size() == 0 ? "" : res.get(0);
    }

    public List<Integer> getIntegerArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Integer::parseInt).collect(Collectors.toList());
    }

    public Integer getInt() throws IOException {
        List<Integer> res = this.getIntegerArray(1);
        return res.size() == 0 ? 0 : res.get(0);
    }

    public List<Long> getLongArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Long::parseLong).collect(Collectors.toList());
    }

    public Long getLong() throws IOException {
        List<Long> res = this.getLongArray(1);
        return res.size() == 0 ? 0L : res.get(0);
    }

    public List<Double> getDoubleArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Double::parseDouble).collect(Collectors.toList());
    }

    public Double getDouble() throws IOException {
        List<Double> res = this.getDoubleArray(1);
        return res.size() == 0 ? 0.0 : res.get(0);
    }
}

class Utils {
    static int[][] fourDirs = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
    static int[][] eightDirs = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};

    static int modAdd(int a, int b) {
        return (int) ((a + (long) b) % 1000000007);
    }

    static int modSub(int a, int b) {
        return (int) ((a - (long) b + 1000000007) % 1000000007);
    }

    public static List<Integer> sieve(int n) {
        boolean b[] = new boolean[n + 1];
        List<Integer> ans = new ArrayList<>();
        Arrays.fill(b, true);

        for (int i = 2; i <= n; i++) {
            if (b[i]) {
                ans.add(i);
                for (int j = i * i; j >= 0 && j <= n; j += i) {
                    b[j] = false;
                }
            }
        }
        return ans;
    }

    public static boolean isPrime(long n) {
        long sqrt = (long) Math.sqrt(n);
        for (int i = 2; i <= sqrt; i++) {
            if (n % i == 0)
                return false;
        }
        return true;
    }

    public static long mod(long n) {
        if (n > 0)
            return n % 1000000007;
        return (n + 2000000014) % 1000000007;
    }

    public static boolean isSqr(long n) {
        int sqrt = (int) Math.sqrt(n);
        return n == (long) sqrt * sqrt;
    }

    public static boolean inRange(long i, long l, long h) {
        return i >= l && i <= h;
    }

    public static boolean isValid(int i, int j, int n, int m) {
        return i >= 0 && j >= 0 && i < n && j < m;
    }

    public static void swap(List<Integer> ls, int i, int j) {
        int temp = ls.get(i);
        ls.set(i, ls.get(j));
        ls.set(j, temp);
    }

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

    public static long subSum(long[] pre, int l, int h) {
        return l == 0 ? pre[h] : pre[h] - pre[l - 1];
    }

    public static void ifPrint(boolean test, Object ifValue, Object elseValue) {
        System.out.println(test ? ifValue : elseValue);
    }

    public static void print(Character delim, Object... a) {
        List<String> top = new ArrayList<>();
        for (Object aa : a)
            top.add(aa == null ? "null" : aa.toString());
        System.out.println(join(top, delim.toString()));
    }

    public static void print(Object... a) {
        print(' ', a);
    }

    public static <T extends Comparable<T>> int lowerBound(T[] arr, int l, int h, T key) {
        while (l < h) {
            int mid = (l + h) / 2;
            if (arr[mid].compareTo(key) < 0)
                l = mid + 1;
            else
                h = mid;
        }
        return arr[l].compareTo(key) >= 0 ? l : -1;
    }

    public static <T extends Comparable<T>> int upperBound(T[] arr, int l, int h, T key) {
        while (l < h) {
            int mid = (l + h) / 2;
            if (arr[mid].compareTo(key) < 0)
                l = mid + 1;
            else if (arr[mid].compareTo(key) == 0)
                l = mid;
            else
                h = mid;
            if (h == l + 1)
                break;
        }
        return arr[l].compareTo(key) >= 0 ? l : -1;
    }

    public static <T> String join(List<T> ls) {
        return join(ls, " ");
    }

    public static <T> String join(List<T> ls, String delim) {
        StringJoiner sj = new StringJoiner(delim);
        for (T a : ls)
            sj.add(a.toString());
        return sj.toString();
    }

    public static <T> void print2DArray(List<List<T>> mat) {
        for (List<T> m : mat) {
            System.out.println("{ " + join(m, ", ") + " }");
        }
    }

    public static <T> void reverseArrray(T[] arr, int l, int h) {
        while (l < h) {
            T temp = arr[l];
            arr[l] = arr[h];
            arr[h] = temp;
            l++;
            h--;
        }
    }
}