import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    }
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.BufferedOutputStream; BufferedOutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    }
} Main public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    } main {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    } try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        } {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        } BufferedInputStream in = new BufferedInputStream(System.in) BufferedInputStream in = new BufferedInputStream(System.in) new BufferedInputStream(System.in) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) new PrintWriter(new BufferedOutputStream(System.out)) Scanner sc = new Scanner(in); sc new Scanner(in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int bs = 1; bs 1 int d = 0; d 0 for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                d += sc.nextInt();
                if (d <= x) bs++;
            } {
                d += sc.nextInt();
                if (d <= x) bs++;
            } d += sc.nextInt() d sc.nextInt() sc.nextInt sc if (d <= x) bs++; d <= x d x bs++ bs out.println(bs) out.println out bs String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    }
} Main
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 12:33-

            int n = sc.nextInt();
            int x = sc.nextInt();

            int bs = 1;
            int d = 0;
            for (int i = 0; i < n; i++) {
                d += sc.nextInt();
                if (d <= x) bs++;
            }

            out.println(bs);
        }
    }
}
