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 prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    }
} 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 prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int X = scanner.nextInt();

        int prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int X = scanner.nextInt();

        int prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    } 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 prev = 0; prev 0 int cnt = 1; cnt 1 for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        } {
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        } int diff = scanner.nextInt(); diff scanner.nextInt() scanner.nextInt scanner if(X < prev + diff ){
               break;
            } X < prev + diff X prev + diff prev diff {
               break;
            } break; cnt++ cnt prev += diff prev diff System.out.println(cnt) System.out.println System.out System System.out cnt 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 prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int X = scanner.nextInt();

        int prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    }
} 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 prev = 0;
        int cnt = 1;

        for(int i=0; i<N; i++){
            int diff = scanner.nextInt();

            if(X < prev + diff ){
               break;
            }
            cnt++;
            prev += diff;
        }

        System.out.println(cnt);
    }
}