import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int ans = 0; ans 0 int sum = 0; sum 0 int[] l = new int[n]; l new int[n] n for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			l[i] = in.nextInt();
		} {
			l[i] = in.nextInt();
		} l[i] = in.nextInt() l[i] l i in.nextInt() in.nextInt in for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		} {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		} sum += l[i] sum l[i] l i if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			} sum == x sum x {
				ans = i + 2;
				System.out.println(ans);
				return;
			} ans = i + 2 ans i + 2 i 2 System.out.println(ans) System.out.println System.out System System.out ans return; if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			} sum > x sum x {
				ans = i + 1;
				System.out.println(ans);
				return;
			} ans = i + 1 ans i + 1 i 1 System.out.println(ans) System.out.println System.out System System.out ans return; System.out.println(n + 1) System.out.println System.out System System.out n + 1 n 1 in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int x = in.nextInt();

		int ans = 0;
		int sum = 0;
		int[] l = new int[n];
		for ( int i = 0; i < n; i++ ) {
			l[i] = in.nextInt();
		}

		for ( int i = 0; i < n; i++ ) {
			sum += l[i];

			if ( sum == x ) {
				ans = i + 2;
				System.out.println(ans);
				return;
			} else if ( sum > x ) {
				ans = i + 1;
				System.out.println(ans);
				return;
			}
		}

		System.out.println(n + 1);
		in.close();
	}
}
