import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	}
}
/*
 6
khabarovsk 20
moscow 10
kazan 50
kazan 35
moscow 60
khabarovsk 40
 */

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));

 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int x=sc.nextInt(); x sc.nextInt() sc.nextInt sc int[] array=new int[n]; array new int[n] n int f=0 f 0 count=1; count 1 for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			array[i]=sc.nextInt();
		} {
			array[i]=sc.nextInt();
		} array[i]=sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		} {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		} f=f+array[i] f f+array[i] f array[i] array i if(f>x) {
				break;
			} f>x f x {
				break;
			} break; count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int[] array=new int[n];
		int f=0,count=1;

		for(int i=0;i<n;i++) {
			array[i]=sc.nextInt();
		}

		for(int i=0;i<n;i++) {
			f=f+array[i];
			if(f>x) {
				break;
			}
			count++;
		}
		System.out.println(count);


	}
}
/*
 6
khabarovsk 20
moscow 10
kazan 50
kazan 35
moscow 60
khabarovsk 40
 */

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));


