import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int[] c = new int[a]; c new int[a] a int d = 0; d 0 int counter = 1; counter 1 for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
      c[i] = sc.nextInt();
    } {
      c[i] = sc.nextInt();
    } c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    } int j = 0; int j = 0; j 0 j < c.length j c.length c c.length j++ j++ j {
      d += c[j];
      if(b >= d){
        counter++;
      }
    } {
      d += c[j];
      if(b >= d){
        counter++;
      }
    } d += c[j] d c[j] c j if(b >= d){
        counter++;
      } b >= d b d {
        counter++;
      } counter++ counter System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int[] c = new int[a];
    int d = 0;
    int counter = 1;
    for(int i = 0;i < c.length;i++){
      c[i] = sc.nextInt();
    }
    for(int j = 0;j < c.length;j++){
      d += c[j];
      if(b >= d){
        counter++;
      }
    }
    System.out.println(counter);
  }
}