import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int l;
    int d = 0;
    int t = 1;
    for(int a = 0; a < n; a++){
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    }
    System.out.println(t);
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int l;
    int d = 0;
    int t = 1;
    for(int a = 0; a < n; a++){
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    }
    System.out.println(t);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int l;
    int d = 0;
    int t = 1;
    for(int a = 0; a < n; a++){
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    }
    System.out.println(t);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int l;
    int d = 0;
    int t = 1;
    for(int a = 0; a < n; a++){
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    }
    System.out.println(t);
  } 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; l int d = 0; d 0 int t = 1; t 1 for(int a = 0; a < n; a++){
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    } int a = 0; int a = 0; a 0 a < n a n a++ a++ a {
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    } {
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    } l = sc.nextInt() l sc.nextInt() sc.nextInt sc d = d + l d d + l d l if(d <= x){
        t++;
      } d <= x d x {
        t++;
      } t++ t System.out.println(t) System.out.println System.out System System.out t String[] args args
import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int l;
    int d = 0;
    int t = 1;
    for(int a = 0; a < n; a++){
      l = sc.nextInt();
      d = d + l;
      if(d <= x){
        t++;
      }        
    }
    System.out.println(t);
  }
}