import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    } main {
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int max = scan.nextInt(); max scan.nextInt() scan.nextInt scan int range = scan.nextInt(); range scan.nextInt() scan.nextInt scan int dif = 0 dif 0 count = 0 count 0 sum = 0; sum 0 while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	} (sum <= range) && (count < max) (sum <= range) sum range (count < max) count max {
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	} count++ count dif = scan.nextInt() dif scan.nextInt() scan.nextInt scan sum += dif sum dif if(sum <= range){
	    count++;
	} sum <= range sum range {
	    count++;
	} count++ count System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int max = scan.nextInt();
        int range = scan.nextInt();
        int dif = 0, count = 0, sum = 0;
        
	while((sum <= range) && (count < max)){
	    count++;
	    dif = scan.nextInt();
	    sum += dif;
	}
	if(sum <= range){
	    count++;
	}
	System.out.print(count);
    }
}
