import java.util.*;
import java.math.*;

class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int x = stdIn.nextInt();
    int[] l = new int[n];
    for(int i = 0;i<n;i++) {
      l[i] = stdIn.nextInt();
    }
    int count = 0;
    int current = 0;
     while(true) {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     }
     System.out.println(count);
  }
} import java.util.*; util.* java import java.math.*; math.* java class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int x = stdIn.nextInt();
    int[] l = new int[n];
    for(int i = 0;i<n;i++) {
      l[i] = stdIn.nextInt();
    }
    int count = 0;
    int current = 0;
     while(true) {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     }
     System.out.println(count);
  }
} Main public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int x = stdIn.nextInt();
    int[] l = new int[n];
    for(int i = 0;i<n;i++) {
      l[i] = stdIn.nextInt();
    }
    int count = 0;
    int current = 0;
     while(true) {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     }
     System.out.println(count);
  } main {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int x = stdIn.nextInt();
    int[] l = new int[n];
    for(int i = 0;i<n;i++) {
      l[i] = stdIn.nextInt();
    }
    int count = 0;
    int current = 0;
     while(true) {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     }
     System.out.println(count);
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int x = stdIn.nextInt(); x stdIn.nextInt() stdIn.nextInt stdIn int[] l = new int[n]; l new int[n] n for(int i = 0;i<n;i++) {
      l[i] = stdIn.nextInt();
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      l[i] = stdIn.nextInt();
    } {
      l[i] = stdIn.nextInt();
    } l[i] = stdIn.nextInt() l[i] l i stdIn.nextInt() stdIn.nextInt stdIn int count = 0; count 0 int current = 0; current 0 while(true) {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     } true {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     } if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       } current<=x current x {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } count += 1 count 1 if(count-1==l.length) break; count-1==l.length count-1 count 1 l.length l l.length break; current = current + l[count-1] current current + l[count-1] current l[count-1] l count-1 count 1 {
         break;
       } break; System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;
import java.math.*;

class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int x = stdIn.nextInt();
    int[] l = new int[n];
    for(int i = 0;i<n;i++) {
      l[i] = stdIn.nextInt();
    }
    int count = 0;
    int current = 0;
     while(true) {
       if(current<=x) {
         count += 1;
         if(count-1==l.length) break;
         current = current + l[count-1];
       } else {
         break;
       }
     }
     System.out.println(count);
  }
}
