import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	}
} Main public static void main(String[] args) {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	} main {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	} String[] input1; input1 String[] input2; input2 try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        } {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        } Scanner sc = new Scanner(System. in) Scanner sc = new Scanner(System. in) new Scanner(System. in) input1 = sc.nextLine().split(" ") input1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " input2 = sc.nextLine().split(" ") input2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int N = Integer.parseInt(input1[0]); N Integer.parseInt(input1[0]) Integer.parseInt Integer input1[0] input1 0 int X = Integer.parseInt(input1[1]); X Integer.parseInt(input1[1]) Integer.parseInt Integer input1[1] input1 1 int sum=0; sum 0 int ans=1; ans 1 for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      } int i=0; int i=0; i 0 i<N i N i++ i++ i {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      } {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      } sum += Integer.parseInt(input2[i]) sum Integer.parseInt(input2[i]) Integer.parseInt Integer input2[i] input2 i if (X >= sum) {
            ans+=1;
          } X >= sum X sum {
            ans+=1;
          } ans+=1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
        String[] input1;
        String[] input2;
		try (Scanner sc = new Scanner(System. in)) {
		input1 = sc.nextLine().split(" ");
        input2 = sc.nextLine().split(" ");
        }
      
      int N = Integer.parseInt(input1[0]);
      int X = Integer.parseInt(input1[1]);
      int sum=0;
      int ans=1;
      
      for (int i=0;i<N;i++) {
          sum += Integer.parseInt(input2[i]);
          if (X >= sum) {
            ans+=1;
          }
      }
      System.out.println(ans);
	}
}
