
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    }
} Main public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    } main {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner final int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner final int[] lengths = new int[n]; lengths new int[n] n for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 i < lengths.length i lengths.length lengths lengths.length i++ i++ i {
            lengths[i] = scanner.nextInt();
        } {
            lengths[i] = scanner.nextInt();
        } lengths[i] = scanner.nextInt() lengths[i] lengths i scanner.nextInt() scanner.nextInt scanner int i; i int distance = 0; distance 0 for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        } i = 0; i = 0 i 0 i < n i n i++ i++ i {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        } {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        } distance += lengths[i] distance lengths[i] lengths i if (distance > x) {
                break;
            } distance > x distance x {
                break;
            } break; System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 String[] args args public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    }
} public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int x = scanner.nextInt();

        final int[] lengths = new int[n];

        for (int i = 0; i < lengths.length; i++) {
            lengths[i] = scanner.nextInt();
        }

        int i;
        int distance = 0;
        for (i = 0; i < n; i++) {
            distance += lengths[i];
            if (distance > x) {
                break;
            }
        }

        System.out.println(i + 1);
    }
}
