import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int X = Integer.parseInt(sc.next()); X Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] L = new int[N]; L new int[N] N for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            L[i] = Integer.parseInt(sc.next());
        } {
            L[i] = Integer.parseInt(sc.next());
        } L[i] = Integer.parseInt(sc.next()) L[i] L i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 1; cnt 1 int Dprevious = 0; Dprevious 0 for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        } {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        } Dprevious = Dprevious + L[i] Dprevious Dprevious + L[i] Dprevious L[i] L i if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            } Dprevious <= X Dprevious X {
                cnt += 1;
            } cnt += 1 cnt 1 {
                break;
            } break; 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 sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());

        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = Integer.parseInt(sc.next());
        }

        int cnt = 1;
        int Dprevious = 0;
        for (int i = 0; i < N; i++) {
            Dprevious = Dprevious + L[i];
            if (Dprevious <= X) {
                cnt += 1;
            }else{
                break;
            }
        }
        System.out.println(cnt);
    }
}
