import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Twinkle Twinkle Little Star
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    }

    static class BBounding {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream 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) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    }

    static class BBounding {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BBounding solver = new BBounding(); solver new BBounding() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BBounding {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        }

    } BBounding public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        } solve {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        } long n = in.nextLong() n in.nextLong() in.nextLong in x = in.nextLong(); x in.nextLong() in.nextLong in long count = 1 count 1 sum = 0; sum 0 for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            } long i = 1; long i = 1; i 1 i <= n i n i++ i++ i {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            } {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            } long y = in.nextLong(); y in.nextLong() in.nextLong in sum += y sum y if (sum <= x) count++; sum <= x sum x count++ count out.println(count) out.println out count int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    }

    static class BBounding {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    }

    static class BBounding {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Twinkle Twinkle Little Star
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BBounding solver = new BBounding();
        solver.solve(1, in, out);
        out.close();
    }

    static class BBounding {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong(), x = in.nextLong();
            long count = 1, sum = 0;
            for (long i = 1; i <= n; i++) {
                long y = in.nextLong();
                sum += y;
                if (sum <= x) count++;
            }
            out.println(count);

        }

    }
}

