import java.util.Scanner;

public class Main {


	public static void main(String[] args) {
		(new Main()).execute();
	}
	public void execute() { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	}

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


	public static void main(String[] args) {
		(new Main()).execute();
	}
	public void execute() { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		(new Main()).execute();
	} main {
		(new Main()).execute();
	} (new Main()).execute() (new Main()).execute (new Main()) String[] args args public void execute() { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	} execute { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	} 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 L[] = new int[N+2] ; L new int[N+2] N+2 N 2 for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		} int i = 1 ; int i = 1 ; i 1 i <= N i N i ++ i ++ i {
			L[i] = sc.nextInt();
		} {
			L[i] = sc.nextInt();
		} L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc int D[] = new int[N+2] ; D new int[N+2] N+2 N 2 D[1] = 0 D[1] D 1 0 int ans = 2 ; ans 2 for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		} int i = 2 ; int i = 2 ; i 2 i <= N + 1 i N + 1 N 1 i ++ i ++ i {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		} {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		} D[i] = D[i - 1] + L[i - 1] D[i] D i D[i - 1] + L[i - 1] D[i - 1] D i - 1 i 1 L[i - 1] L i - 1 i 1 if(D[i] > X) {
				break;
			} D[i] > X D[i] D i X {
				break;
			} break; ans = i ans i System.out.println(ans) System.out.println System.out System System.out ans public class Main {


	public static void main(String[] args) {
		(new Main()).execute();
	}
	public void execute() { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	}

} public class Main {


	public static void main(String[] args) {
		(new Main()).execute();
	}
	public void execute() { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {


	public static void main(String[] args) {
		(new Main()).execute();
	}
	public void execute() { ;
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int X = sc.nextInt();
		int L[] = new int[N+2] ;
		for(int i = 1 ; i <= N ; i ++) {
			L[i] = sc.nextInt();
		}

		int D[] = new int[N+2] ;
		D[1] = 0 ;
		int ans = 2 ;
		for(int i = 2 ; i <= N + 1 ; i ++) {
			D[i] = D[i - 1] + L[i - 1];
			if(D[i] > X) {
				break;
			}
			ans = i ;
		}

		System.out.println(ans);
	}

}
