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()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    }
} 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()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    } 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 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 prevD = 0; prevD 0 int result = 1; result 1 while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        } result != n + 1 result n + 1 n 1 {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        } int d = prevD + l[result - 1]; d prevD + l[result - 1] prevD l[result - 1] l result - 1 result 1 if (d > x) {
                break;
            } d > x d x {
                break;
            } break; prevD = d prevD d result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    }
} 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()), x = Integer.parseInt(sc.next());
        int[] l = new int[n];
        for (int i = 0; i < n; i++) {
            l[i] = Integer.parseInt(sc.next());
        }
        int prevD = 0;
        int result = 1;
        while (result != n + 1) {
            int d = prevD + l[result - 1];
            if (d > x) {
                break;
            }
            prevD = d;
            result++;
        }

        System.out.println(result);
    }
}
