import java.util.Scanner;

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

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final int iBoundNum = Integer.parseInt(sc.next());
        final int iCoordinate = Integer.parseInt(sc.next());

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final int iBoundNum = Integer.parseInt(sc.next());
        final int iCoordinate = Integer.parseInt(sc.next());

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    } main {
        Scanner sc = new Scanner(System.in);
        final int iBoundNum = Integer.parseInt(sc.next());
        final int iCoordinate = Integer.parseInt(sc.next());

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int iBoundNum = Integer.parseInt(sc.next()); iBoundNum Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int iCoordinate = Integer.parseInt(sc.next()); iCoordinate Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int iBoundCnt = 1; iBoundCnt 1 int iBoundTotal = 0; iBoundTotal 0 for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        } int i = 0; int i = 0; i 0 i < iBoundNum i iBoundNum i++ i++ i {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        } {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        } int iBoundLength = Integer.parseInt(sc.next()); iBoundLength Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc iBoundTotal += iBoundLength iBoundTotal iBoundLength if (iBoundTotal > iCoordinate) {
                break;
            } iBoundTotal > iCoordinate iBoundTotal iCoordinate {
                break;
            } break; iBoundCnt++ iBoundCnt System.out.print(iBoundCnt) System.out.print System.out System System.out iBoundCnt String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final int iBoundNum = Integer.parseInt(sc.next());
        final int iCoordinate = Integer.parseInt(sc.next());

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final int iBoundNum = Integer.parseInt(sc.next());
        final int iCoordinate = Integer.parseInt(sc.next());

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    }
} Main
import java.util.Scanner;

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

        int iBoundCnt = 1;
        int iBoundTotal = 0;
        for (int i = 0; i < iBoundNum; i++) {
            int iBoundLength = Integer.parseInt(sc.next());
            iBoundTotal += iBoundLength;
            if (iBoundTotal > iCoordinate) {
                break;
            }
            iBoundCnt++;
        }
        System.out.print(iBoundCnt);
    }
}
