import java.util.Scanner;
 
 
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    }
 
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    }
 
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int currentPlace = 0; currentPlace 0 int c = 0; c 0 for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        } int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        } {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        } if(currentPlace <= x) {
        		c ++;
        	} currentPlace <= x currentPlace x {
        		c ++;
        	} c ++ c currentPlace = currentPlace + scanner.nextInt() currentPlace currentPlace + scanner.nextInt() currentPlace scanner.nextInt() scanner.nextInt scanner if(currentPlace <= x) {
        	c++;        } currentPlace <= x currentPlace x {
        	c++;        } c++ c System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    }
 
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    }
 
} Main
import java.util.Scanner;
 
 
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int currentPlace = 0;
        int c = 0;
        for(int k = 0; k < n; k++) {
        	if(currentPlace <= x) {
        		c ++;
        	} 
        	currentPlace = currentPlace + scanner.nextInt();
        }
        
        if(currentPlace <= x) {
        	c++;        }
        System.out.println(c);
    }
 
}