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.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader();
		PrintWriter out = new PrintWriter(System.out);
		final long start = System.currentTimeMillis();		
		//new Task1().solve(in, out);
		new Task2().solve(in, out);
		@SuppressWarnings("unused")
		final long duration = System.currentTimeMillis()-start;
		out.close();
	}

	static class Task2{
		public void solve(InputReader in, PrintWriter out){
			int n = in.nextInt(), k = in.nextInt();
			
			int sum = 0, rem = 0, ans = -1;
			for(int i=0; i<n; i++){
				int temp = in.nextInt()+rem;
				if(temp>8){
					temp -= 8;
					rem = temp;
					sum += 8;
				} else {
					sum += temp;
					rem = 0;
				}

				if(ans<0 && sum>=k){
					ans = i+1;
				}
			}
			out.println(ans);
		}
	}
	static class Task1{	
		static final int MAX = 1000001;
		public void solve(InputReader in, PrintWriter out){
			// lets implement the n^2 method first, will optimize later
			int n = in.nextInt(), q = in.nextInt();
			QuickUnion road = new QuickUnion(n);
			QuickUnion rail = new QuickUnion(n);
			for(int ii=0; ii<q; ii++){
				int type = in.nextInt();
				if(type==1){
					int a = in.nextInt()-1, b = in.nextInt()-1;
					rail.union(a,b);
				} else if(type==2){
					int a = in.nextInt()-1, b = in.nextInt()-1;
					road.union(a,b);
				} else {
					throw new InputMismatchException();
				}

				boolean flag = false;
				for(int i=0; !flag && i<n; i++){
					for(int j=0; !flag && j<n; j++){
						if(rail.connected(i,j) && !road.connected(i,j)){
							flag = true;
						}
					}
				}
				if(flag){
					out.println("NO");
				} else {
					out.println("YES");
				}
			}
		}

		long gcd(long a, long b){
			while(a!=0){
				long rem = b%a;
				b = a;
				a = rem;
			}
			return b;
		}

		long expo(long a, long b, long MOD){
			long result = 1;
			while (b>0){
				if (b%2==1) result=(result*a) ;
				b>>=1;
				a=(a*a) ;
			}
			return result ;
		}

		long inverseModullo(long numerator, long denominator, long MOD){
			return ((numerator )*(expo(denominator, MOD-2, MOD))) ;
		}
	}
	static class QuickUnion{
		int[] id;
		int[] size;
		public QuickUnion(int n){
			id = new int[n];
			size = new int[n];
			for(int i=0; i<n; i++){
				id[i] = i;
				size[i] = 1;
			}
		}
		public int root(int a){
			while(a!=id[a]){
				id[a] = id[id[a]];
				a = id[a];
			}
			return a;
		}
		public boolean connected(int p, int q){
			return root(p)==root(q);
		}
		public void union(int p, int q){
			int pid = root(p);
			int qid = root(q);
			if(pid==qid) return;
			if(size[pid]>=size[qid]){
				size[pid] += size[qid];
				id[qid] = pid;
			} else {
				size[qid] += size[pid];
				id[pid] = qid;
			}
		}
	}
	static class InputReader{
		static int text = 5;
		final InputStream stream;
		final byte[] buf = new byte[8192];
		int curChar, numChars;
		SpaceCharFilter filter;
		public InputReader(){
			this.stream = System.in;
		}
		public int read(){
			if(numChars == -1) throw new InputMismatchException();
			if(curChar >= numChars){
				curChar = 0;
				try{
					numChars = stream.read(buf);
				} catch(IOException e){
					throw new InputMismatchException();
				}
				if(numChars <= 0) return -1;
			}
			return buf[curChar++];
		}
		public int nextInt(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			int res = 0;
			do{
				if(c<'0' || c>'9') throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while(!isSpaceChar(c));
			return res*sgn;
		}
		public long nextLong(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			long res = 0;
			do{
				if(c<'0' || c>'9') throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while(!isSpaceChar(c));
			return res*sgn;
		}
		public String next(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			StringBuilder res = new StringBuilder();
			do{
				res.appendCodePoint(c);
				c = read();
			}while(!isSpaceChar(c));
			return res.toString();
		}
		public boolean isSpaceChar(int c){
			if(filter != null) return filter.isSpaceChar(c);
			return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
		}
		public interface SpaceCharFilter{
			public boolean isSpaceChar(int ch);
		}
	}
}