import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    } main {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = Integer.parseInt(scan.next()); n Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int x = Integer.parseInt(scan.next()); x Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int[] l = new int[n]; l new int[n] n int sum = 0; sum 0 int bNum = 1; bNum 1 for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        } int i = 0; int i = 0; i 0 i < l.length i l.length l l.length i++ i++ i {
            l[i] = Integer.parseInt(scan.next());
        } {
            l[i] = Integer.parseInt(scan.next());
        } l[i] = Integer.parseInt(scan.next()) l[i] l i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        } int i l {
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        } {
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        } if(sum + i > x){
                break;
            } sum + i > x sum + i sum i x {
                break;
            } break; sum += i sum i bNum++ bNum System.out.println(bNum) System.out.println System.out System System.out bNum String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int x = Integer.parseInt(scan.next());
        int[] l = new int[n];
        int sum = 0;
        int bNum = 1;
        for(int i = 0; i < l.length; i++){
            l[i] = Integer.parseInt(scan.next());
        }
        for(int i : l){
            if(sum + i > x){
                break;
            }
            sum += i;
            bNum++;
        }
        System.out.println(bNum);
    }
}
